summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.common.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 81e26e1b..2dbd7c7c 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -132,22 +132,23 @@
$.fn.gallery_context_menu = function() {
if ($(".g-context-menu li").length) {
var hover_target = $(this).find(".g-context-menu");
+ if (hover_target.attr("context_menu_initialized")) {
+ return;
+ }
var list = $(hover_target).find("ul");
- var in_progress = 0;
hover_target.find("*").removeAttr('title');
list.hide();
hover_target.hover(
function() {
- if (in_progress == 0) {
- list.slideDown("fast", function() { in_progress = 1; });
- $(this).find(".g-dialog-link").gallery_dialog();
- $(this).find(".g-ajax-link").gallery_ajax();
- }
+ list.stop(true, true).slideDown("fast");
+ $(this).find(".g-dialog-link").gallery_dialog();
+ $(this).find(".g-ajax-link").gallery_ajax();
},
function() {
- list.slideUp("slow", function() { in_progress = 0; });
+ list.stop(true, true).slideUp("slow");
}
);
+ hover_target.attr("context_menu_initialized", 1);
}
};