jquery判断滚动条到底

$(document).scroll(function(){
var dHeight = $(document).height();
var wHeight = $(window).height();
var scrollTop = $(document).scrollTop();
if( dHeight-wHeight <= scrollTop){
alert("到底了");
}
})

  is good!

posted @ 2015-04-25 18:09  leisir  阅读(445)  评论(0编辑  收藏  举报