$(document).ready(function(){
let top1 = 0;
let top2 = 0;
let timer = null; // 定时器
$(document).scroll(function(){clearTimeout(timer);
timer = setTimeout(isScrollEnd, 1000);
top1 = document.documentElement.scrollTop || document.body.scrollTop;
console.log("滚动中")// 滚动的时候触发
});
function isScrollEnd() {
top2 = document.documentElement.scrollTop || document.body.scrollTop;
if(top1 == top2){console.log('滚动完结了')
}
}
});