diff --git a/_javascript/modules/components/img-lazyload.js b/_javascript/modules/components/img-lazyload.js index 9e7593e..b79c87c 100644 --- a/_javascript/modules/components/img-lazyload.js +++ b/_javascript/modules/components/img-lazyload.js @@ -1,9 +1,15 @@ /** - * Setup image lazy-load + * Set up image lazy-load */ export function imgLazy() { if ($('#core-wrapper img[data-src]') <= 0) { return; } + + /* Stop shimmer when image loaded */ + document.addEventListener('lazyloaded', function (e) { + const $img = $(e.target); + $img.parent().removeClass('shimmer'); + }); } diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 29d5bcf..fd48b8d 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -91,7 +91,6 @@ img { &.lazyloaded { -webkit-animation: fade-in 0.35s ease-in; animation: fade-in 0.35s ease-in; - z-index: 0; } }