ScrollStop是一个jQuery插件,当在Windows系统上开始滚动和停止滚动的时候,jQuery会触发两个事件:scrollstart和scrollstop。
示例代码:
$(window) .on("scrollstart",function(){ //Painttheworldyellowwhenscrollingstarts. $(document.body).css({background:"yellow"}); }) .on("scrollstop",function(){ //Paintitallgreenwhenscrollingstops. $(document.body).css({background:"green"}); })
评论