jquery.lazyload przestaje sprawdzać scrollTop, jeżeli element nie ma atrybutu 'lazylo...
authorzuber <marek@stepniowski.com>
Sat, 22 Aug 2009 21:04:21 +0000 (23:04 +0200)
committerzuber <marek@stepniowski.com>
Sat, 22 Aug 2009 21:04:21 +0000 (23:04 +0200)
project/static/js/jquery.lazyload.js

index 522250f..50a183e 100644 (file)
         }
         
         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());