Browse Source

Add window.onresize event handler.

Window resize can cause previously folded images to be visible (e.g. increase the width or height of the browser window), the lazy loading handler should be attached to this event as well.
pull/17/head
onlyurei 11 years ago committed by Cheng Fan
parent
commit
359c42987b
  1. 2
      src/echo.js

2
src/echo.js

@ -38,8 +38,10 @@ window.Echo = (function (window, document, undefined) {
if (document.addEventListener) {
window.addEventListener('scroll', _throttle, false);
window.addEventListener('resize', _throttle, false);
} else {
window.attachEvent('onscroll', _throttle);
window.attachEvent('onresize', _throttle);
}
};

Loading…
Cancel
Save