From: zuber Date: Sat, 22 Aug 2009 21:11:57 +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/3d36b15a04d228e79c4c1722a3545eaa14a9fa81?ds=sidebyside;hp=--cc jquery.lazyload przestaje sprawdzać scrollTop, jeżeli element nie ma atrybutu 'lazyload:lastCheckedScrollTop'. --- 3d36b15a04d228e79c4c1722a3545eaa14a9fa81 diff --git a/project/static/js/jquery.lazyload.js b/project/static/js/jquery.lazyload.js index 522250ff..c15167bd 100644 --- a/project/static/js/jquery.lazyload.js +++ b/project/static/js/jquery.lazyload.js @@ -23,6 +23,9 @@ } function checkScroll() { + if (container.data('lazyload:lastCheckedScrollTop') == undefined) { + return; + } if (Math.abs(container.scrollTop() - container.data('lazyload:lastCheckedScrollTop')) > settings.scrollThreshold) { container.data('lazyload:lastCheckedScrollTop', container.scrollTop());