summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-02-16 12:12:16 +0100
committershadlaws <shad@shadlaws.com>2013-02-16 12:12:16 +0100
commita8b571cc974ee69da40b47d8b3a5db80ae0ec2b0 (patch)
treeb5fe528d9ea086010098bf0afc6b9d00296f2da4 /lib/gallery.common.js
parent4523a3a49aca4bdf186aaeedca891b2c138233ac (diff)
Context menu dialog box problem: better, but still not working.
- removed fake attr settings (possible compatibility issue with newer jQuery) - replaced with extra class - fixed formatting - still doesn't work: addClass works, but hasClass always returns false when function runs again
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index e23f3fad..95988573 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -26,9 +26,9 @@
}
var el = $(this).find(".g-valign");
if (!el.length) {
- $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() +
- "</" + container + ">");
- el = $(this).children(container + ".g-valign");
+ $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() +
+ "</" + container + ">");
+ el = $(this).children(container + ".g-valign");
}
var elh = $(el).height();
var ph = $(this).height();
@@ -133,8 +133,8 @@
$.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;
+ if (hover_target.hasClass("g-context-menu-initialized")) {
+ return;
}
var list = $(hover_target).find("ul");
hover_target.find("*").removeAttr('title');
@@ -149,7 +149,7 @@
list.stop(true, true).slideUp("slow");
}
);
- hover_target.attr("context_menu_initialized", 1);
+ hover_target.addClass("g-context-menu-initialized");
}
};