From 457708311a466d8b116d5b28575be1bc3baad864 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 23 Aug 2009 14:58:26 -0600 Subject: Cut down on jittering of the context menu on open on resize view. --- lib/gallery.common.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/gallery.common.js') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 06775d79..16cb7ea2 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -112,15 +112,19 @@ }; $.fn.gallery_context_menu = function() { + var in_progress = 0; + $(".gContextMenu *").removeAttr('title'); $(".gContextMenu ul").hide(); $(".gContextMenu").hover( function() { - $(this).find("ul").slideDown("fast"); - $(this).find(".gDialogLink").gallery_dialog(); - $(this).find(".gAjaxLink").gallery_ajax(); + if (in_progress == 0) { + $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); + $(this).find(".gDialogLink").gallery_dialog(); + $(this).find(".gAjaxLink").gallery_ajax(); + } }, function() { - $(this).find("ul").slideUp("slow"); + $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); } ); }; -- cgit v1.2.3