From 570af1cb7f31022791ade47fd3d675f753a3029b Mon Sep 17 00:00:00 2001 From: Colin Baxter Date: Wed, 17 May 2017 11:48:43 -0600 Subject: [PATCH] Changing how the loaded class is added to new svg element so as to not propagate wrong classes on duplicates --- js/inline-svg.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/inline-svg.js b/js/inline-svg.js index 06be9de..4569880 100644 --- a/js/inline-svg.js +++ b/js/inline-svg.js @@ -29,8 +29,7 @@ var $svg = $(ajax.responseText); - $svg.attr('class', classNames + ' loaded'); - $imgInstances.replaceWith($svg); + $imgInstances.replaceWith($svg).addClass('loaded'); } else {