window.addEventListener('scroll',()=>{
let scrollTop = document.documentElement.scrollTop||document.body.scrollTop ;
let clientHeight = document.documentElement.clientHeight || document.body.clientHeight ;
let scrollHeight = document.documentElement.scrollHeight||document.body.scrollHeight ;
if(Math.round(scrollTop+clientHeight) == scrollHeight){
$('.load-more').click();
}
});
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4589/viewspace-2825289/ ,如需转载,请注明出处,否则将追究法律责任。