开发者

jQuery setting height, width dynamically

开发者 https://www.devze.com 2023-02-02 02:36 出处:网络
I need to change height and width of a <div> using jQuery I tried following code jQuery(\'#chart_popup\').css(\'height\',\'600px\');开发者_Python百科

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

精彩评论

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