From bf36c04f639e2e364710bb5245d7a183bcd02e42 Mon Sep 17 00:00:00 2001 From: avradul Date: Fri, 15 Sep 2017 19:29:21 +0300 Subject: [PATCH] No need .removeAttr(bgAttr) No need .removeAttr(bgAttr) same as data-src for images. This allows to add animation, for example [data-bg] { opacity: 0; transition: opacity 0.5s ease; } .lazy-loaded[data-bg] { opacity: 1; } --- src/jquery.lazyloadxt.bg.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/jquery.lazyloadxt.bg.js b/src/jquery.lazyloadxt.bg.js index 683984c..6ec57cf 100644 --- a/src/jquery.lazyloadxt.bg.js +++ b/src/jquery.lazyloadxt.bg.js @@ -15,7 +15,6 @@ if (!!url) { $this .css('background-image', "url('" + url + "')") - .removeAttr(bgAttr) .triggerHandler('load'); } });