Browse Source

IE8 Support

pull/4/head v1.3.0
Todd Motto 11 years ago
parent
commit
8743bff34f
  1. 4
      dist/echo.js
  2. 2
      dist/echo.min.js
  3. 4
      src/echo.js

4
dist/echo.js vendored

@ -21,8 +21,8 @@ window.Echo = (function (window, document, undefined) {
var self = store[i]; var self = store[i];
if (_inView(self)) { if (_inView(self)) {
self.src = self.getAttribute('data-echo'); self.src = self.getAttribute('data-echo');
if ([].indexOf && store.indexOf(self) !== -1) { if ([].indexOf && [].slice.call(store).indexOf(self) !== -1) {
store.splice(i, 1); [].slice.call(store).splice(i, 1);
} }
} }
} }

2
dist/echo.min.js vendored

@ -5,4 +5,4 @@
* by Todd Motto: http://toddmotto.com * by Todd Motto: http://toddmotto.com
* Copyright. MIT licensed. * 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!==c.indexOf(b)&&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(){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);

4
src/echo.js

@ -14,8 +14,8 @@ window.Echo = (function (window, document, undefined) {
var self = store[i]; var self = store[i];
if (_inView(self)) { if (_inView(self)) {
self.src = self.getAttribute('data-echo'); self.src = self.getAttribute('data-echo');
if ([].indexOf && store.indexOf(self) !== -1) { if ([].indexOf && [].slice.call(store).indexOf(self) !== -1) {
store.splice(i, 1); [].slice.call(store).splice(i, 1);
} }
} }
} }

Loading…
Cancel
Save