mirror of https://github.com/toddmotto/echo.git
Nikolaus Piccolotto
11 years ago
3 changed files with 3 additions and 3 deletions
@ -1,2 +1,2 @@
|
||||
/*! Echo v1.4.0 | (c) 2014 @toddmotto | MIT license | github.com/toddmotto/echo */ |
||||
window.Echo=function(a,b){"use strict";var c,d,e,f,g=[],h=function(d){var e=d.getBoundingClientRect();return(e.top>=0&&e.left>=0&&e.top)<=(a.innerHeight||b.documentElement.clientHeight)+parseInt(c)},i=function(){for(var a=g.length;a--;){var b=g[a];h(b)&&(b.src=b.getAttribute("data-echo"),g.splice(a,1))}},j=function(){clearTimeout(e),e=setTimeout(i,d)},k=function(e){var h=e||{};c=h.offset||0,d=h.throttle||250,f=b.querySelector(h.domElement)||a;for(var i=b.querySelectorAll(h.domElement+" [data-echo]"),k=0;k<i.length;k++)g.push(i[k]);j(),b.addEventListener?f.addEventListener("scroll",j,!1):f.attachEvent("onscroll",j)};return{init:k,render:j}}(window,document); |
||||
window.Echo=function(a,b){"use strict";var c,d,e,f,g=[],h=function(d){var e=d.getBoundingClientRect();return(e.top>=0&&e.left>=0&&e.top)<=(a.innerHeight||b.documentElement.clientHeight)+parseInt(c)},i=function(){for(var a=g.length;a--;){var b=g[a];h(b)&&(b.src=b.getAttribute("data-echo"),g.splice(a,1))}},j=function(){clearTimeout(e),e=setTimeout(i,d)},k=function(e){var h=e||{};c=h.offset||0,d=h.throttle||250,f=h.domElement?b.querySelector(h.domElement):a;for(var i=b.querySelectorAll(h.domElement+" [data-echo]"),k=0;k<i.length;k++)g.push(i[k]);j(),b.addEventListener?f.addEventListener("scroll",j,!1):f.attachEvent("onscroll",j)};return{init:k,render:j}}(window,document); |
Loading…
Reference in new issue