js实现下滑加载更多的效果

var stop=true;
$(window).scroll(function(){
totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
if($(document).height() <= totalheight){
if(stop==true){
stop=false;
//下滑到底后要执行的代码


stop=true;
}
}
});
posted @ 2016-10-12 17:37  SingleShadow  阅读(2832)  评论(0编辑  收藏  举报