diff --git a/src/echo.js b/src/echo.js index 95a46bf..f886846 100644 --- a/src/echo.js +++ b/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); } };