4.6.19 • Published 2 years ago
exizt.scroll-top v4.6.19
ScrollTop JS
The script that creates an arrow in the bottom-right corner of the screen to scroll back to the top.
Download and Setup
- Download and place the files in a project directory.
- using
dist/scroll-top.mix.jsfile.
Usage
html
<script type="module" src="dist/scroll-top.mix.js"></script>or
<link rel="stylesheet" href="dist/scroll-top.css">
<script type="module">
import { ScrollTop } from 'dist/scroll-top.js';
const scrolltop = new ScrollTop()
scrolltop.load()
</script>Options
Option List
base: Minimum height value for symbol visibility.- (type
number, default100)
- (type
debug: debug log..- (type
boolean, defaultfalse)
- (type
(example)
scrolltop.load({
base:300
})How to use option
html, js
<link rel="stylesheet" href="../dist/scroll-top.css">
<script type="module">
import { ScrollTop } from '../dist/scroll-top.js';
const scrolltop = new ScrollTop()
scrolltop.load()
</script>npm, typescript
npm
npm install --save-dev exizt.scroll-topTypeScript
import { ScrollTop } from 'exizt.scroll-top'
const scrolltop = new ScrollTop()
scrolltop.load()License
MIT License