From: zuber Date: Sat, 22 Aug 2009 21:04:21 +0000 (+0200) Subject: jquery.lazyload przestaje sprawdzać scrollTop, jeżeli element nie ma atrybutu 'lazylo... X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/29e85f3abb726164e4fb336fccdbffb8819c9d13?ds=sidebyside;hp=be97b26f386471a32186791be8f72f8ad9f6b3e1 jquery.lazyload przestaje sprawdzać scrollTop, jeżeli element nie ma atrybutu 'lazyload:lastCheckedScrollTop'. --- diff --git a/project/static/js/jquery.lazyload.js b/project/static/js/jquery.lazyload.js index 522250ff..50a183ec 100644 --- a/project/static/js/jquery.lazyload.js +++ b/project/static/js/jquery.lazyload.js @@ -23,6 +23,10 @@ } function checkScroll() { + console.log(checkScroll, container.data('lazyload:lastCheckedScrollTop')); + if (container.data('lazyload:lastCheckedScrollTop') == undefined) { + return; + } if (Math.abs(container.scrollTop() - container.data('lazyload:lastCheckedScrollTop')) > settings.scrollThreshold) { container.data('lazyload:lastCheckedScrollTop', container.scrollTop());