var t = 0,
b = 0;
$(window).scroll(function(){
t = $(this).scrollTop();
if(b < t){
console.log('向下滚动中...')
}else{
console.log('向上滚动中...')
}
setTimeout(function(){
b = t
}, 0)
})
原文地址:https://www.cnblogs.com/xiaobaiv/p/10123766.html
时间: 2024-10-10 15:16:13