Michael Cordingley 11 years ago
parent
commit
a52e55228a
  1. 6
      src/echo.js

6
src/echo.js

@ -2,7 +2,7 @@ window.Echo = (function (window, document, undefined) {
'use strict'; 'use strict';
var store; var store = [];
var _inView = function (img) { var _inView = function (img) {
var coords = img.getBoundingClientRect(); var coords = img.getBoundingClientRect();
@ -19,7 +19,9 @@ window.Echo = (function (window, document, undefined) {
}; };
var init = function () { var init = function () {
store = Array.prototype.slice.call(document.querySelectorAll('[data-echo]')); var nodes = document.querySelectorAll('[data-echo]');
for (var i = nodes.length; i--; store.unshift(nodes[i]));
_pollImages(); _pollImages();
window.onscroll = _pollImages; window.onscroll = _pollImages;
}; };

Loading…
Cancel
Save