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:50 am
#107640
Participant
Ok, fixed that, but it’s still returning as undefined. This is what the javascript looks like now, but the HTML and CSS are the same as above.
var cssWidth = $('#box').css('width');
alert(cssWidth);