SickGear/gui/slick/js/inc_bottom.js
JackDandy 802efa2cca Change improve page load time when loading images.
Update isotope library 2.2.2 to 3.0.1.
Add lazyload package 3.0.0 (2e318b1).
2017-01-01 18:16:51 +00:00

18 lines
523 B
JavaScript

function initLazyload(){
$.ll = new LazyLoad({elements_selector:'img[data-original]', callback_load:function(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;
}
}
}});
$.ll.handleScroll();
return !0;
}
$(document).ready(function(){
!/undefined/i.test(typeof(LazyLoad)) && initLazyload();
});