Skip to content

Commit

Permalink
fix: shimmer has the potential to cover images (#1100)
Browse files Browse the repository at this point in the history
Resolves #1100
  • Loading branch information
cotes2020 committed Jun 24, 2023
1 parent 4fe145e commit 74ab6f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 1 addition & 7 deletions _javascript/modules/components/img-lazyload.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
/**
* Set up image lazy-load
* Setup 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');
});
}
1 change: 1 addition & 0 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ img {
&.lazyloaded {
-webkit-animation: fade-in 0.35s ease-in;
animation: fade-in 0.35s ease-in;
z-index: 0;
}
}

Expand Down

0 comments on commit 74ab6f8

Please sign in to comment.