changeset 977:17bf6ac7a8cd

attach click event to body instead of document?
author hertzhaft
date Thu, 26 Jan 2012 17:51:47 +0100
parents c01876d65bb8
children 3b334a7d81ec f34891279a6e
files webapp/src/main/webapp/jquery/jquery.digilib.buttons.js
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.buttons.js	Thu Jan 26 16:37:11 2012 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.buttons.js	Thu Jan 26 17:51:47 2012 +0100
@@ -274,7 +274,7 @@
                 var $button = $elem.find('div.button-scale');
                 var buttonRect = geom.rectangle($button);
                 var divRect = geom.rectangle($div);
-                $(document).on("click.scalemode", function(event) {
+                $('body').on("click.scalemode", function(event) {
                         $div.fadeOut();
                         });
                 $div.fadeIn();
@@ -388,7 +388,7 @@
         var newMode = $select.find("option:selected").attr("name");
         console.debug('setting mode to:', newMode);
         var $div = data.scaleModeDiv;
-        $(document).off("click.scalemode");
+        $('body').off("click.scalemode");
         $div.fadeOut();
         digilib.actions.setScaleMode(data, newMode);
     };