$(window) .on("scrollstart", function() { // Paint the world yellow when scrolling starts. $(document.body).css({background: "yellow"}); }) .on("scrollstop", function() { // Paint it all green when scrolling stops. $(document.body).css({background: "green"}); });
https://github.com/ssorallen/jquery-scrollstop
开始滚动和停止滚动的时候 会发出事件