From 90f03006671eb476923d4a5d66f0d75ce975aecb Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Tue, 8 Jul 2014 08:31:21 -0300 Subject: [PATCH] Add images' classes --- public/javascripts/application.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 51451ad..036c777 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1112,11 +1112,12 @@ function apply_zoom_to_images(zoom_text) { if ($(this).width() < original['width'] || $(this).height() < original['height']) { $(this).wrap('
'); $(this).parent('.zoomable-image') - .attr({style: $(this).attr('style')}) - .css({ - width: $(this).width(), - height: $(this).height(), - }); + .attr({style: $(this).attr('style')}) + .addClass(this.className) + .css({ + width: $(this).width(), + height: $(this).height(), + }); $(this).attr('style', ''); $(this).after(''+zoom_text+''); } -- libgit2 0.21.2