An open API service indexing awesome lists of open source software.

https://github.com/exizt/scroll-top

스크롤을 상위로 올리는 화살표를 화면 우측 하단에 만들어주는 스크립트.
https://github.com/exizt/scroll-top

javascript typescript

Last synced: 2 months ago
JSON representation

스크롤을 상위로 올리는 화살표를 화면 우측 하단에 만들어주는 스크립트.

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
```html

import { 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
})
```