# wantscroll

> scroll to any

Latest version **1.0.1** (published 2019-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install wantscroll
pnpm add wantscroll
yarn add wantscroll
bun add wantscroll
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-02-12 |
| First published | 2019-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | yq |
| Maintainers | jiangchaohq |

## Links

- npm: https://www.npmjs.com/package/wantscroll
- Repository: https://github.com/sclear/scroll
- Homepage: https://github.com/sclear/scroll#readme
- Issues: https://github.com/sclear/scroll/issues
- npm.io page: https://npm.io/package/wantscroll

## Dependencies (5)

- [gulp](https://npm.io/package/gulp.md) ^4.0.0
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.26.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.2.2
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^3.0.1
- [babel-plugin-transform-remove-strict-mode](https://npm.io/package/babel-plugin-transform-remove-strict-mode.md) 0.0.2

## Recent versions

- 1.0.1 (latest) — 2019-02-12
- 1.0.0 — 2019-02-12

## README

# *wantScroll*

> npm install wantscroll --save-dev

>滚动条前往任意位置( 容器空间内 )
>支持window对象 或者节点中的滚动

---

```
//构造函数中需要参数速度(Number)
let wantscroll = new wantScroll(
    el,{          //window对象
        speed: 10 //速度
    }
)
```

+ 测试 滚动读取scroll值
  - getHeight

+ 前往位置scroll位置(Number,fn) 接收一个数字 和 回调函数
  - wantTo(100,fn)    默认回到顶部

+ 上一次记录数组(Array)
  - pre

+ 返回到上一次滚动位置
  - wantToback

+ 清空历史记录
  - clearHistory

+ 读取 记忆 实例时高度
  - getNewTop

+ 回到实例时位置
  - wantToNew

---
_Source: https://npm.io/package/wantscroll · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
