Lightweight JavaScript library for scroll up
npm install ue-scroll-jsLightweight JavaScript library for scroll up.
Demo and documentation:
https://azrsix.github.io/ue-scroll-js/
```
$ npm install ue-scroll-js --save
``
$ yarn add ue-scroll-js
``
``
Your main contents
``
```
'use strict';
import ue from 'ue-scroll-js';
// Run this script
ue.init();
By the default, ue-scroll.js automatically detect element having '#ue-scroll'. It needs to be started after DOM is rendered.
| Key | Data Type | Default Value | Description |
| --------------- | --------- | ------------- | ---------------------------------------------------------------------------- |
| element | String | '#ue-scroll' | Specify an element with a CSS selector. |
| position | Number | 200 | Specify the scroll position where the button is displayed. |
| scrollSpeed | Number | 10 | Specify the speed of scrolling (Recommend 20 or less) |
| fadeSpeed | Number | 10 | Specify the speed of fade (Recommend 20 or less) |
| cancelByScroll | Boolean | true | Cancel scrolling when scroll down (This setting is ignored on touch devices) |
| cancelByClick | Boolean | true | Cancel scrolling when window clicking. |
| cancelByKeydown | Boolean | true | Cancel scrolling when pressed any key. |
In addition, You can freely change the color, design, position etc of buttons with CSS!
Please refer to the documentation.