Dodanie namespace do danych zapisywanych przez jquery.lazyload.js.
authorzuber <marek@stepniowski.com>
Wed, 19 Aug 2009 22:16:27 +0000 (00:16 +0200)
committerzuber <marek@stepniowski.com>
Wed, 19 Aug 2009 22:16:27 +0000 (00:16 +0200)
project/static/js/jquery.lazyload.js

index ea3de6f..522250f 100644 (file)
@@ -12,7 +12,7 @@
         }
         
         var container = this;
         }
         
         var container = this;
-        container.data('lastScroll', -10000);
+        container.data('lazyload:lastCheckedScrollTop', -10000);
         
         function aboveViewport(container, element, threshold) {
             return $(container).offset().top >= $(element).offset().top + $(element).height() + threshold;
         
         function aboveViewport(container, element, threshold) {
             return $(container).offset().top >= $(element).offset().top + $(element).height() + threshold;
@@ -23,8 +23,8 @@
         }
         
         function checkScroll() {
         }
         
         function checkScroll() {
-            if (Math.abs(container.scrollTop() - container.data('lastScroll')) > settings.scrollThreshold) {
-                container.data('lastScroll', container.scrollTop());
+            if (Math.abs(container.scrollTop() - container.data('lazyload:lastCheckedScrollTop')) > settings.scrollThreshold) {
+                container.data('lazyload:lastCheckedScrollTop', container.scrollTop());
                 
                 $(pattern, container).each(function() {
                     if (aboveViewport(container, this, settings.threshold)
                 
                 $(pattern, container).each(function() {
                     if (aboveViewport(container, this, settings.threshold)