1.0.3 • Published 8 years ago
animated-smooth-scroll-to v1.0.3
Animated Scroll
An ES6 plugin written in TypeScript to replicate the easy functionality of the jQuery animate method for smooth scrolling.
Usage
animatedScroll(position, duration)where..
positionis the y-offset on the page where you want to scroll to (in px).durationis how long the scroll animation should take (in milliseconds).
Example
animatedScroll(1400, 400)Tips
The position value of any HTMLElement can easily be extracted by making use of the getBoundingClientRect() method.