I can't get the right window height for IE7
I think I've tried everything to get the right window height in IE7 but all in vain.
Is there 1 surefire way to get the right window(viewport) height in IE7 and the other (better) browsers?
I've t开发者_运维技巧ried:
window.innerHeight(),
document.innerHeight()
Jquery:
$(window).height(),
$('body').height(),
$('body').css('height')
The website link
$(window).height();
Will return the proper viewport height on IE7 - it could be how you're using it. If you try the following:
alert($(window).height());
You'll see its working (just tested IE7). If that simple bit of code doesn't work for you, make sure the jQuery library is loading properly, and make sure that you're checking the height inside a document.ready block.
精彩评论