到目前为止,我已经尝试过这种情况。
'if ($(window).scrollTop() == $(document).height() - $(window).height())'
所以任何人都可以帮助我得到解决方案.???
到目前为止,我已经尝试过这种情况。
'if ($(window).scrollTop() == $(document).height() - $(window).height())'
所以任何人都可以帮助我得到解决方案.???
$(window).on('scroll', function() {
if (($(this).scrollTop() + $(this).height()) - $(document).outerHeight(true) > (-200)) {...}
});
尝试这个:
$(function () {
$(window).on('scroll', function () {
if ($(window).scrollTop() + $(window).height() >= $(document).height() - 200) {
//initate ajax here
}
});
});