|
|
@ -16,10 +16,14 @@ window.Echo = (function (window, document, undefined) { |
|
|
|
return (coords.top >= 0 && coords.left >= 0 && coords.top) <= (window.innerHeight || document.documentElement.clientHeight); |
|
|
|
return (coords.top >= 0 && coords.left >= 0 && coords.top) <= (window.innerHeight || document.documentElement.clientHeight); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _getStyle = function(el, prop) { |
|
|
|
|
|
|
|
return window.getComputedStyle ? window.getComputedStyle(el, null).getPropertyValue(prop) : el.currentStyle[prop]; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var _pollImages = function () { |
|
|
|
var _pollImages = function () { |
|
|
|
for (var i = 0; i < store.length; i++) { |
|
|
|
for (var i = 0; i < store.length; i++) { |
|
|
|
var self = store[i]; |
|
|
|
var self = store[i]; |
|
|
|
if (_inView(self)) { |
|
|
|
if (_inView(self) && (_getStyle(self, 'display') !== 'none' && _getStyle(self.parentNode, 'display') !== 'none')) { |
|
|
|
self.src = self.getAttribute('data-echo'); |
|
|
|
self.src = self.getAttribute('data-echo'); |
|
|
|
if ([].indexOf && [].slice.call(store).indexOf(self) !== -1) { |
|
|
|
if ([].indexOf && [].slice.call(store).indexOf(self) !== -1) { |
|
|
|
[].slice.call(store).splice(i, 1); |
|
|
|
[].slice.call(store).splice(i, 1); |
|
|
|