开发者

Jquery Dialog window size

How do I make a JQuery dialog size to the size of the window?

I tried using 'auto' but that just makes it size to its elements, and I d开发者_开发百科on't want to specifiy the px's exactly b/c that won't be dynamic. thanks!


I'm taking a little bit of a guess here, but you can get the size of the window using:

var windowWidth = $(window).width();
var windowHeight = $(window).height();

So, I would take that, and pass that value to the jQuery Dialog.

$( ".dialog" ).dialog({ height: windowHeight, width: windowWidth });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜