https://github.com/exizt/scroll-top
스크롤을 상위로 올리는 화살표를 화면 우측 하단에 만들어주는 스크립트.
https://github.com/exizt/scroll-top
javascript typescript
Last synced: 2 months ago
JSON representation
스크롤을 상위로 올리는 화살표를 화면 우측 하단에 만들어주는 스크립트.
- Host: GitHub
- URL: https://github.com/exizt/scroll-top
- Owner: exizt
- License: gpl-2.0
- Created: 2020-01-29T15:31:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T00:05:51.000Z (over 1 year ago)
- Last Synced: 2024-03-15T07:23:23.006Z (about 1 year ago)
- Topics: javascript, typescript
- Language: TypeScript
- Homepage:
- Size: 406 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScrollTop JS
> The script that creates an arrow in the bottom-right corner of the screen to scroll back to the top.* Github: https://github.com/exizt/scroll-top/
* Demo : https://exizt.github.io/scroll-top/## Download and Setup
1. Download and place the files in a project directory.
2. using `dist/scroll-top.mix.js` file.## Usage
### Setup
html
```html```
CDN
```html```
### Customize
#### Options
Option List
- `base`: Minimum height value for symbol visibility.
- (type `number`, default `100`)
- `debug` : debug log..
- (type `boolean`, default `false`)(example)
```js
scrolltop.load({
base:300
})
```#### How to use
html, js
```htmlimport { ScrollTop } from '../dist/scroll-top.js';
const scrolltop = new ScrollTop()
scrolltop.load({
base:300
})```
npm, TypeScript
```shell
npm install --save-dev exizt.scroll-top
``````ts
import { ScrollTop } from 'exizt.scroll-top'const scrolltop = new ScrollTop()
scrolltop.load({
base:300
})
```