4.6.19 • Published 7 months ago

exizt.scroll-top v4.6.19

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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

  1. Download and place the files in a project directory.
  2. using dist/scroll-top.mix.js file.

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, default 100)
  • debug : debug log..
    • (type boolean, default false)

(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-top

TypeScript

import { ScrollTop } from 'exizt.scroll-top'
const scrolltop = new ScrollTop()
scrolltop.load()

License

MIT License

4.6.19

7 months ago

4.5.18

7 months ago

4.5.17

2 years ago

4.3.16

2 years ago

4.3.15

2 years ago

4.2.13

2 years ago

4.1.11

2 years ago

4.1.10

2 years ago

4.0.9

2 years ago