scrollto.js
Smooth scroll to a specific position or target element
Examples
; // Scroll the window object to a specific positionwindow; // Or scroll an element with overflow auto or scrolllet myFoo = document;myFoo; // Scroll the window to the element with id barlet myBar = document;window; // Vertically scroll the window to element bar with an offset of 100pxwindow;
Scroll options
duration: 500 horizontal: true vertical: true offsetX: 0 offsetY: 0
Installation
$ npm install scrollto.js --save