Skip to content

Instantly share code, notes, and snippets.

@Dionid
Created January 11, 2016 13:36
Show Gist options
  • Save Dionid/5176ec549429f5286f6a to your computer and use it in GitHub Desktop.
Save Dionid/5176ec549429f5286f6a to your computer and use it in GitHub Desktop.
var getWindowsWidthAndHeight = function(){
var w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0],
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
return {width:x,height:y}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment