沒有大神 幫寫斷jq的瀑布流 下拉自動刷新
注意是jquery
<script>
//監聽滾動事件
let timer = null;
document.addEventListener('scroll', function () {
clearTimeout(timer);
//判斷是否滾動到 底部
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 50){
timer = setTimeout(function(){
document.getElementById('gundong').click();
},300)
}
});
</script>
這段在jquery的js里不生效 能否用jquery的方式寫個js來觸發下拉刷新時間