back2top
v1.0.1
Published
Let the window return to top
Downloads
5
Readme
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/