我是开发人员,目前正在通过Spring-MVC开发该项目。我目前的问题不是滚动事件取决于设备。我的当前滚动事件代码如下:
$(function(){
$(window).scroll(function(){
if ($(window).scrollTop() == ($(document).height() - $(window).height())) {
push_list(address); // not come in
logcheck() // not come in
}
});
});目前,这个滚动事件条件函数在web上运行得很好。它在LG Nexus 5//Android6上运行良好。然而,它不适用于LGV30//Android8和三星NOTE8 Android8...maybe等。这是Android版本的问题吗?有解决办法吗?
这是webview screen的一个函数。
发布于 2019-08-30 05:51:47
通过更改高度值解析。这个问题是通过比较content的高度与top的值加上height值来解决的,而不是它是否等于TOP的值。
$(window).scroll(function(){
var scrollT = $(this).scrollTop();
var scrollH = $(this).height();
var contentH = $('#pushlist').height();
if ( scrollT + scrollH + 1 >= contentH ) push_list(address);
});https://stackoverflow.com/questions/57720805
复制相似问题