summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-09-09 21:04:18 -0700
committerBharat Mediratta <bharat@menalto.com>2010-09-09 21:04:18 -0700
commit32878ebfdce943271824891639ab0384053bbadd (patch)
tree5c2df67fa6aa8abbaf3f7facd6de3404ae9a4ea4 /lib
parent36f3a0387ddc484ebe867cf284aaf05f6ce6e5e1 (diff)
Replace the hook function hack I introduced in
cbba45fffc7368280e9529f55e108d0080175b6a with a namespaced jQuery custom event. This is way more portable.
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.common.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 69452f39..9fccc602 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -119,11 +119,9 @@
};
// Ajax handler for replacing an image, used in Ajax thumbnail rotation
- $.gallery_replace_image = function(data, thumb) {
- $(thumb).attr({src: data.src, width: data.width, height: data.height});
- if (typeof gallery_image_replaced_hook == 'function') {
- gallery_image_replaced_hook(data, thumb);
- }
+ $.gallery_replace_image = function(data, img_selector) {
+ $(img_selector).attr({src: data.src, width: data.width, height: data.height});
+ $(img_selector).trigger("gallery.change");
};
// Initialize context menus