Skip to content Skip to sidebar Skip to footer

Setting Width Of Div Jquery

I'm trying to set the width of a div using jquery. this is how I'm trying to set the size of the div $('#page').css('width',data[0]['imageWidth']); and this is the div I'm tryin

Solution 1:

In CSS lengths require a unit, in this case most likely Pixel (px):

$('#page').css("width",data[0]['imageWidth'] + "px");

Post a Comment for "Setting Width Of Div Jquery"