开发者

jQuery setting height, width dynamically

I need to change height and width of a <div> using jQuery

I tried following code

jQuery('#chart_popup').css('height','600px');开发者_Python百科
jQuery('#chart_popup').css('width','450px');

I need this to be done in one statement, any suggestion?

Thanks.


jQuery('#chart_popup').css( {width : '30px', height : '10px'} )


You can do it in one hit like this...

jQuery('#chart_popup').css({height: "600px", width: "450px"});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜