From d1792ab3e03dd151041f2b044ebad6422ce47d38 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 26 Sep 2009 15:44:34 -0600 Subject: Clean up hover effect, move some CSS out of ui.init.js to screen.css. Fix context_menu, it wasn't closing. Fix context_menu in IE7 by putting a bg color on the menu --- lib/gallery.common.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/gallery.common.js') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 6e3efe5a..618c556e 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -113,10 +113,11 @@ $.fn.gallery_context_menu = function() { if ($(".gContextMenu li").length) { + var hover_target = ".gContextMenu"; var in_progress = 0; - $(".gContextMenu *").removeAttr('title'); - $(".gContextMenu ul").hide(); - $(".gContextMenu li").hover( + $(hover_target + " *").removeAttr('title'); + $(hover_target + " ul").hide(); + $(hover_target).hover( function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); @@ -125,7 +126,7 @@ } }, function() { - $(this).find(".gContext").slideUp("slow", function() { in_progress = 0; }); + $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); } ); } -- cgit v1.2.3