UPDATE! The scroll event allows reacting to a page or element scrolling. To start a script it’s always a good idea to have a plan in place. The duration and easing function possess some sensible default values (thanks to ES2015 default arguments) and the callback function should be optional. The implementation is extremely easy, but unfortunately this method isn’t supported well enough to be used reliably (yet).
How many times have you seen the effect of a page scrolling down after clicking a button?
Please let me know what you think about my solution. So requestAnimationFrame looks like a perfect candidate for this scenario. At the time of writing, this solution was working very well for me. The example function below (arbitrarily called pageScroll) shows how this can work: To being scrolling automatically when the page loads, add the following code to the body tag: To begin scrolling when prompted by the user, call the function from a link or button: Scroll Page (Note: If you click this link, you'll need to click the link at the bottom of the page to cancel the scrolling). Most of the geometry properties here are read-only, but scrollLeft/scrollTop can be changed, and the browser will scroll the element.
To start a script it’s always a good idea to have a plan in place. I know that the browser support isn’t that amazing compared to the usual jQuery solution. Load more data when the user scrolls down till the end of the page. The compromise between browser support, bloating code and performance is a question that you need to answer yourself depending on your project. jQuery UI 1.10.3 Framework