Polyfill for
-
window.scroll(x, y, ScrollOptions);
-
window.scrollTo(x, y, ScrollOptions);
-
window.scrollBy(x, y, ScrollOptions);
-
element.scrollIntoView(toTop, ScrollOptions); (incomplete)
bower install --save smoothscroll
This depends upon requestAnimationFrame
. As such you can use either
dist/smoothscroll.js if you have a raf polyfill already included (or are
supporting only raf-enabled browsers), or use dist/smoothscroll.raf.js
to use a version bundled with a polyfill (batteries included version).
This has been tested successfully in the following browsers:
- Safari 6+ (desktop, haven't tested iOS)
- FirefoxNightly
- Chrome
- Opera Next