bloody-scroll
Smooth scrolling to given coordinates for the browser
Install
$ npm install --save bloody-scroll
Import
API
promise scroll({ x: number, y: number}, duration = 300)
Arguments
coords.x
: (Number) Horizontal target for scroll.coords.y
: (Number) Vertical target for scroll.duration
: (Number) Transition duration.
Returns
promise
: (Promise) A promise that is fulfilled once the transition is done.
Example