//<!-- 页面滚动动态加载数据,页面下拉自动加载内容 -->
$(window).scroll(function(){
totalheight =parseFloat($(window).scrollTop())+ parseFloat($(window).height());
if(($(document).height()/2) <= totalheight ) { //有滚动条 且滚动到触发点(一半)
next();
}
});
$(window).on('mousewheel', function(event) { //手机不支持
totalheight =parseFloat($(window).scrollTop())+ parseFloat($(window).height());
if(totalheight==$(document).height()) //无滚动条
{
if(event.originalEvent.wheelDelta<0) //且 向下滚动
next();
}
});
JS页面滚动动态加载数据,页面下拉自动加载内容
猜你喜欢
转载自blog.csdn.net/chenhao0568/article/details/81066321
今日推荐
周排行