I have some calculations that rely on window.innerHeight
. But as I have found out this is not available in any IE before IE9. All the other options I have looked at don't even come close to the figure I get when I use window.innerHeight
.
Does anybody have a work around?
The read-only innerHeight property of the Window interface returns the interior height of the window in pixels, including the height of the horizontal scroll bar, if present. The value of innerHeight is taken from the height of the window's layout viewport. The width can be obtained using the innerWidth property.
innerWidth / innerHeight - includes padding but not border. outerWidth / outerHeight - includes padding, border, and optionally margin. height / width - element height (no padding, no margin, no border)
The innerWidth property is available on any window or object that behaves like a window, such as a frame or tab.
You might want to try:
document.documentElement.clientHeight;
Or can use jQuery's .height()
method:
$(window).height();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With