2023-03-18 01:28:44 +03:00
|
|
|
/**
|
2023-06-26 16:54:20 +03:00
|
|
|
* Set up image lazy-load
|
2023-03-18 01:28:44 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
export function imgLazy() {
|
|
|
|
if ($('#core-wrapper img[data-src]') <= 0) {
|
|
|
|
return;
|
|
|
|
}
|
2023-06-26 16:54:20 +03:00
|
|
|
|
|
|
|
/* Stop shimmer when image loaded */
|
|
|
|
document.addEventListener('lazyloaded', function (e) {
|
|
|
|
const $img = $(e.target);
|
|
|
|
$img.parent().removeClass('shimmer');
|
|
|
|
});
|
2023-03-18 01:28:44 +03:00
|
|
|
}
|