summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 14c28a56..1eaa6db2 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -27,3 +27,17 @@
});
};
})(jQuery);
+
+// Get the viewport size
+(function () {
+ $.getViewportSize = function() {
+ return {
+ width : function() {
+ return $(window).width();
+ },
+ height : function() {
+ return $(window).height();
+ }
+ };
+ };
+})(jQuery);