diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 599f23d155..1eaa6db2b9 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(); } }; };