标签:log scrolltop time jquer top var this else OLE
var t = 0,
b = 0;
$(window).scroll(function(){
t = $(this).scrollTop();
if(b < t){
console.log('向下滚动中...')
}else{
console.log('向上滚动中...')
}
setTimeout(function(){
b = t
}, 0)
})
标签:log scrolltop time jquer top var this else OLE
原文地址:https://www.cnblogs.com/xiaobaiv/p/10123766.html