$(window).height();
Will return the correct viewport height in IE7 - this may be how you use it. If you try the following:
alert($(window).height());
You will see its work (just tested IE7). If this simple bit of code does not work for you, make sure the jQuery library loads correctly and make sure you check the height inside the document.ready block.
source share