IOS下页面滚动到底部检测_Detect if the page scrolled to the bottom in IOS

在ios下检测页面是否滚动到底部会出现页面底部判断不准确的问题,这个时候需要在页面头部加入viewpor的meta:height=device-height <meta name=’viewport’ content=’height=device-height,width=device-width,initial-scale=1.0’/>

然后加入检测代码:

$(window).scroll(function(){

//这里的o.lastItemHandle用于选中最后一行记录,即页面滚动到下面,最后一条记录可见
if ($(o.lastItemHandle).is(‘:visible’)){
if(win.scrollTop() + win.height() >= $(document).height()){}
}
});