Home › Forums › JavaScript › JQuery Css width of a div returns undefined. › Re: JQuery Css width of a div returns undefined.
August 10, 2012 at 12:58 am
#107651
Noel Forte
Participant
fixed it. apparently this is the wrong way to do it:
Demo
and this is the RIGHT way:
Demo
if you do do it the first way, by loading the scripts in the head, you need to call
$(document).ready(function(){
//Code goes here.
});
in your script file.