Browse Source

Add option 'container' to support other containers than default window - fix

pull/64/head
Arnaud JAEGERS 11 years ago
parent
commit
3753d161a1
  1. 8
      src/echo.js

8
src/echo.js

@ -55,11 +55,11 @@
container = opts.container || root; container = opts.container || root;
echo.render(); echo.render();
if (document.addEventListener) { if (document.addEventListener) {
root.addEventListener('scroll', debounceOrThrottle, false); container.addEventListener('scroll', debounceOrThrottle, false);
root.addEventListener('load', debounceOrThrottle, false); container.addEventListener('load', debounceOrThrottle, false);
} else { } else {
root.attachEvent('onscroll', debounceOrThrottle); container.attachEvent('onscroll', debounceOrThrottle);
root.attachEvent('onload', debounceOrThrottle); container.attachEvent('onload', debounceOrThrottle);
} }
}; };

Loading…
Cancel
Save