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 });
精彩评论