summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-31 20:27:53 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-07-31 20:47:33 +0800
commit86c7fabeaf6fcc9fbbdf1c1a7dc2a3cf9c9a6366 (patch)
treee8a65bad4610f3653fa0879e8e750bef9a7cf5ae /lib
parent64aa96b5527b0a887800bb4d7868495b4397da74 (diff)
Simplify getViewportSize function to use the jQuery height and width functions
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'lib')
-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();
}
};
};