到目前为止我已经尝试过这种情况。
'if ($(window).scrollTop() == $(document).height() - $(window).height())'
谁能帮我找到解决方案.???
最佳答案
$(window).on('scroll', function() {
if (($(this).scrollTop() + $(this).height()) - $(document).outerHeight(true) > (-200)) {...}
});
关于javascript - 当滚动条距离窗口底部 200px 时加载 AJAX 页面,窗口大小可能会有所不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12313757/