summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-31 05:27:53 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-31 05:27:53 -0700
commit0a2da7731ad7d1cf7c0164a455457d91ba767e83 (patch)
tree5aaf74cacd5e1b2f8b5e2ca6993c815cfc3574a7 /lib/gallery.common.js
parent7aa03e59bad72d549c348a597c0d9b6fd63e0fa6 (diff)
Simplify getViewportSize function to use the jQuery height and width functions
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 599f23d1..1eaa6db2 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -33,14 +33,10 @@
$.getViewportSize = function() {
return {
width : function() {
- return window.innerWidth
- || document.documentElement && document.documentElement.clientWidth
- || document.body.clientWidth;
+ return $(window).width();
},
height : function() {
- return window.innerHeight
- || document.documentElement && document.documentElement.clientHeight
- || document.body.clientHeight;
+ return $(window).height();
}
};
};