Created
January 12, 2012 22:10
-
-
Save matharchod/1603450 to your computer and use it in GitHub Desktop.
JSON object that uses jQuery to get width and height of viewport
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 measure = { | |
'num' : 9, | |
'wHeight' : function(){ | |
var h = $(window).height(); | |
return h; | |
}, | |
'wWidth' : function(){ | |
var w = $(window).width(); | |
return w; | |
}, | |
'divis' : function(){ | |
var x = measure.num / 3; | |
return x; | |
}, | |
'sheight' : function(){ | |
var y = measure.wHeight() / measure.divis(); | |
return y; | |
}, | |
'swidth' : function(){ | |
var z = measure.wWidth() / measure.divis(); | |
return z; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment