Ulhas Tuscano
Ulhas Tuscano

Reputation: 5620

Jquery model popup maximize mode issue

I want to open JQuery Dialog in maximized mode.
When I set Width & Height properties of the model window It slightly goes out of inner window & shows up horizontal scollbar. What's wrong in my code

 $("#popupwin").dialog({ width: $(document).width(), 
                         height: $(document).height(), 
                         resizable: false });

Upvotes: 0

Views: 586

Answers (1)

Joao
Joao

Reputation: 7486

I guess you may want to use $(window)?

From jQuery documentation:

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document

Basically, HTML document can go way longer than the actual window viewport so it doesn't make sense to use $(document) at your case.

Upvotes: 3

Related Questions