2024-08-18 04:43:52 +00:00
|
|
|
function hide_lazy_ani (element){
|
|
|
|
if (element.id) {
|
|
|
|
var el = document.getElementById('loading-' + element.id), className = 'hide';
|
|
|
|
if (!!document.body.classList) {
|
|
|
|
el.classList.add(className);
|
|
|
|
} else {
|
|
|
|
el.className += (el.className ? ' ' : '') + className;
|
2023-01-12 01:04:47 +00:00
|
|
|
}
|
2024-08-18 04:43:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function initLazyload(){
|
|
|
|
$.ll = new LazyLoad({elements_selector:'img[data-original]', callback_load: hide_lazy_ani,
|
|
|
|
callback_error: hide_lazy_ani});
|
2023-01-12 01:04:47 +00:00
|
|
|
$.ll.handleScroll();
|
|
|
|
return !0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
!/undefined/i.test(typeof(LazyLoad)) && initLazyload();
|
|
|
|
});
|