我想添加一些功能到我的页面时,它是完全向下滚动。有没有人能用Jquery判断页面是否已经完全向下滚动了?
发布于 2012-02-01 12:54:00
尝尝这个。
$(window).scroll(function(){
if(($(document).height() - $(document).scrollTop()) == $(window).height()){
//Scroll reached at the bottom
}
});发布于 2012-02-01 13:16:43
jQuery Waypoints是适合这项工作的工具。有几个演示突出了Waypoints利用的事件驱动模型。
发布于 2012-07-10 21:18:48
对于滚动映射,你可以使用这个;
$(window).scroll(function() {
var scrollVal = $(this).scrollTop();
//console.log(scrollVal);
if ( scrollVal > 0 && scrollVal < 100 ){
//code
}else if ( scrollVal > 100 && scrollVal < 200 ) {
//code
}else{ //bigger than 200px
//code
}
});https://stackoverflow.com/questions/9090834
复制相似问题