Browse Source

Updated with 'display' conditional

pull/7/head
Scott Vinkle 11 years ago
parent
commit
db4060a5e9
  1. 2
      dist/echo.min.js

2
dist/echo.min.js vendored

@ -5,4 +5,4 @@
* by Todd Motto: http://toddmotto.com
* Copyright. MIT licensed.
*/
window.Echo=function(a,b){"use strict";var c,d=function(c){var d=c.getBoundingClientRect();return(d.top>=0&&d.left>=0&&d.top)<=(a.innerHeight||b.documentElement.clientHeight)},e=function(){for(var a=0;a<c.length;a++){var b=c[a];d(b)&&(b.src=b.getAttribute("data-echo"),[].indexOf&&-1!==[].slice.call(c).indexOf(b)&&[].slice.call(c).splice(a,1))}},f=function(){c=b.querySelectorAll("[data-echo]"),e(),a.onscroll=e};return{init:f}}(window,document);
window.Echo=function(a,b){"use strict";var c,d=function(c){var d=c.getBoundingClientRect();return(d.top>=0&&d.left>=0&&d.top)<=(a.innerHeight||b.documentElement.clientHeight)},e=function(b,c){return a.getComputedStyle?a.getComputedStyle(b,null).getPropertyValue(c):b.currentStyle[c]},f=function(){for(var a=0;a<c.length;a++){var b=c[a];d(b)&&"none"!==e(b,"display")&&"none"!==e(b.parentNode,"display")&&(b.src=b.getAttribute("data-echo"),[].indexOf&&-1!==[].slice.call(c).indexOf(b)&&[].slice.call(c).splice(a,1))}},g=function(){c=b.querySelectorAll("[data-echo]"),f(),a.onscroll=f};return{init:g}}(window,document);

Loading…
Cancel
Save