Skip to content

Instantly share code, notes, and snippets.

@seabre
Created February 11, 2013 07:50
Show Gist options
  • Save seabre/4753158 to your computer and use it in GitHub Desktop.
Save seabre/4753158 to your computer and use it in GitHub Desktop.
Crossbrowser innerHeight
(function(){
if(window.innerWidth!= undefined){
return [window.innerWidth, window.innerHeight];
}
else{
var B= document.body,
D= document.documentElement;
return [Math.max(D.clientWidth, B.clientWidth),
Math.max(D.clientHeight, B.clientHeight)];
}
})()[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment