summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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");
}
};