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;
echo.render();
if (document.addEventListener) {
root.addEventListener('scroll', debounceOrThrottle, false);
root.addEventListener('load', debounceOrThrottle, false);
container.addEventListener('scroll', debounceOrThrottle, false);
container.addEventListener('load', debounceOrThrottle, false);
} else {
root.attachEvent('onscroll', debounceOrThrottle);
root.attachEvent('onload', debounceOrThrottle);
container.attachEvent('onscroll', debounceOrThrottle);
container.attachEvent('onload', debounceOrThrottle);
}
};

Loading…
Cancel
Save