From 0a2da7731ad7d1cf7c0164a455457d91ba767e83 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 31 Jul 2009 05:27:53 -0700 Subject: Simplify getViewportSize function to use the jQuery height and width functions --- lib/gallery.common.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/gallery.common.js') 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(); } }; }; -- cgit v1.2.3