代码:
var scroll = mui('.mui-scroll-wrapper').scroll(); document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function (e){ var scrollTop = scroll.y; //判断滚动到底部 if(scrollTop == scroll.maxScrollY){ //上拉加载逻辑代码 } });
var scroll = mui('.mui-scroll-wrapper').scroll(); document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function (e){ var scrollTop = scroll.y; //判断滚动到底部 if(scrollTop == scroll.maxScrollY){ //上拉加载逻辑代码 } });