back2top

1.0.1 • Public • Published

back2top

Usage

var back2top = require('back2top');
 * back2top()

API

back2top(stopTop,rate,callback)

1. stopTop: Where window stopped. (滚动到停止的位置,默认回到顶部)
2. rate: rolling speed,default 2. (速度,默认2)
3. callback: when the window stops rolling, the callback will execute. (滚动结束后的回调,传入停止位置)

thanks for

张鑫旭大神

http://www.zhangxinxu.com/wordpress/2017/01/share-a-animation-algorithm-js/

Readme

Keywords

none

Package Sidebar

Install

npm i back2top

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mcdyzg