X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2e4974b1f5600a3a446d5b0844a8d63d9fb5fbb3..e604fe43fe077291ff4d4bd528eb48ef6bec6d21:/project/static/js/jquery.lazyload.js diff --git a/project/static/js/jquery.lazyload.js b/project/static/js/jquery.lazyload.js index ea3de6ff..522250ff 100644 --- a/project/static/js/jquery.lazyload.js +++ b/project/static/js/jquery.lazyload.js @@ -12,7 +12,7 @@ } 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; @@ -23,8 +23,8 @@ } 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)