From 556d0d40eb33295a934eb6b906598fc94771d9c1 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Mon, 18 Feb 2013 16:15:49 +0100 Subject: Context menus are fixed! This should be fully compatible with older themes since only gallery.common.js is modified. Now that I understand the problem and the fix, I'm not sure I can explain why it *used* to work with older jQuery... --- lib/gallery.common.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 548aa29a..fa11aeb9 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -137,18 +137,21 @@ return; } var list = $(hover_target).find("ul"); + hover_target.find("*").removeAttr('title'); + hover_target.find(".g-dialog-link").gallery_dialog(); + hover_target.find(".g-ajax-link").gallery_ajax(); list.hide(); + hover_target.hover( function() { list.stop(true, true).slideDown("fast"); - $(this).find(".g-dialog-link").gallery_dialog(); - $(this).find(".g-ajax-link").gallery_ajax(); }, function() { list.stop(true, true).slideUp("slow"); } ); + hover_target.addClass("g-context-menu-initialized"); } }; -- cgit v1.2.3