@tomidavies/scrollto
v4.0.0
Published
A lightweight scrollto module that scrolls the user back up to the top of the page or to an element.
Downloads
1
Maintainers
Readme
Scrollto
A lightweight scrollto module that scrolls the user back up to the top of the page or to an element.
Tech
Scrollto uses Javscript and requires HTML and class to initialize.
Installation
Pull down Scrollto module.
$ cd <project directory>/<script directory>
$ npm install @tomidavies/scrollto
Create a HTML button element with class (name it whatever you like).
<button class="scrollto-button">Button text</button>
Example usage:
new ScrollTo('.scrollto-button');