Last active
December 12, 2015 02:59
-
-
Save CyrilKrylatov/4703582 to your computer and use it in GitHub Desktop.
TL;DR IE sucks as hell How to get windows height that will be compatible with all the majors browsers ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getWindowHeight = function() { | |
if (typeof(window.innerWidth) == 'number') { | |
windowHeight = window.innerHeight; | |
} else if (document.documentElement && document.documentElement.clientHeight) { | |
windowHeight = document.documentElement.clientHeight; | |
} | |
return windowHeight; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment