1.0.1 • Published 7 years ago

back2top v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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/