Commit 90f03006671eb476923d4a5d66f0d75ce975aecb
1 parent
925df3dd
Exists in
master
and in
28 other branches
Add images' classes
Showing
1 changed file
with
6 additions
and
5 deletions
Show diff stats
public/javascripts/application.js
... | ... | @@ -1112,11 +1112,12 @@ function apply_zoom_to_images(zoom_text) { |
1112 | 1112 | if ($(this).width() < original['width'] || $(this).height() < original['height']) { |
1113 | 1113 | $(this).wrap('<div class="zoomable-image" />'); |
1114 | 1114 | $(this).parent('.zoomable-image') |
1115 | - .attr({style: $(this).attr('style')}) | |
1116 | - .css({ | |
1117 | - width: $(this).width(), | |
1118 | - height: $(this).height(), | |
1119 | - }); | |
1115 | + .attr({style: $(this).attr('style')}) | |
1116 | + .addClass(this.className) | |
1117 | + .css({ | |
1118 | + width: $(this).width(), | |
1119 | + height: $(this).height(), | |
1120 | + }); | |
1120 | 1121 | $(this).attr('style', ''); |
1121 | 1122 | $(this).after('<a href="' + $(this).attr('src') + '" class="zoomify-image"><span class="zoomify-text">'+zoom_text+'</span></a>'); |
1122 | 1123 | } | ... | ... |