1.0.3 • Published 6 years ago

animated-smooth-scroll-to v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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..

  • position is the y-offset on the page where you want to scroll to (in px).

  • duration is 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.

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago