本文共 473 字,大约阅读时间需要 1 分钟。
// $(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(); } });