IE8 doesn't have window.innerWidth or window.innerHeight So here is two functions to help with that.
/** | |
* Get window width | |
**/ | |
var getWindowWidth = function() { | |
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | |
}; | |
/** | |
* Get window height | |
**/ | |
var getWindowHeight = function() { | |
return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment