c075e11a4e
This reverts commit 74ab6f8adc
.
15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
/**
|
|
* 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');
|
|
});
|
|
}
|