@tomidavies/scrollto

4.0.0 • Public • Published

Scrollto

N|Solid

Version Downloads

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');

Package Sidebar

Install

npm i @tomidavies/scrollto

Weekly Downloads

1

Version

4.0.0

License

MIT

Unpacked Size

1.93 kB

Total Files

3

Last publish

Collaborators

  • tomidavies