scroll-speed-detection
Installation
npm install scroll-speed-detection
Usage
/** * @limit Number Trigger succ function threshold. 触发 succ 函数的临界值 default: 100 px * @time Number Monitoring time. 监听的时间 default: 300 ms 函数 300 ms 触发一次 * @succ Function(指定时间内 scroll 距离超过limit 触发 succ) * @fail Function(指定时间内 scroll 未距离超过limit 触发 fail) */ // remove window scroll listener