var t = 0, ????b = 0;$(window).scroll(function(){ ???t = $(this).scrollTop(); ???if(b < t){ ???????console.log('向下滚动中...') ???}else{ ???????console.log('向上滚动中...') ???} ???setTimeout(function(){ ???????b = t ???}, 0)})
jQuery 判断页面上下滚动
原文地址:https://www.cnblogs.com/xiaobaiv/p/10123766.html