var t = 0,
b = 0;
$(window).scroll(function(){
t = $(this).scrollTop();
if(b < t){
console.log('向下滚动中...')
}else{
console.log('向上滚动中...')
}
setTimeout(function(){
b = t
}, 0)
})
var t = 0,
b = 0;
$(window).scroll(function(){
t = $(this).scrollTop();
if(b < t){
console.log('向下滚动中...')
}else{
console.log('向上滚动中...')
}
setTimeout(function(){
b = t
}, 0)
})