zc2
asked on
jQuery returns incorrect window height
I have a site (it's an intranet, so I can't give a link) which uses jQuery.ui dialogs to show messages.
It uses only jQuery and jQuery.UI plus some of our own JS and CSS.
When the page content is much bigger than the view port (the browser window) (so there is vertical scroll bar appears) the dialog is shown at the bottom of the browser's window. Also the opposite is true, when the page content is much less to the browser's window, the dialog is aligned to the top edge.
I've found out that on this site the following expression is always equals true (in Chrome and Mozilla, but not in IE) and I believe that is the reason for the dialog misplacing.
What could be a cause for that?
It uses only jQuery and jQuery.UI plus some of our own JS and CSS.
When the page content is much bigger than the view port (the browser window) (so there is vertical scroll bar appears) the dialog is shown at the bottom of the browser's window. Also the opposite is true, when the page content is much less to the browser's window, the dialog is aligned to the top edge.
I've found out that on this site the following expression is always equals true (in Chrome and Mozilla, but not in IE) and I believe that is the reason for the dialog misplacing.
$(document).height()===$(window).height()
On other sites these two methods return different sizes of the page content and the viewport accordingly.What could be a cause for that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For what it's worth, this page has all the info too: http://www.dibsplace.com/webdev/browserinfo.html Feel free to copy it if you want.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.