summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gallery.common.js')
-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