1

到目前为止,我已经尝试过这种情况。

'if ($(window).scrollTop() == $(document).height() - $(window).height())'

所以任何人都可以帮助我得到解决方案.???

4

2 回答 2

0
$(window).on('scroll', function() {
    if (($(this).scrollTop() + $(this).height()) - $(document).outerHeight(true) > (-200)) {...}
});

小提琴

于 2012-09-07T07:40:18.430 回答
0

尝试这个:

$(function () {
    $(window).on('scroll', function () {
        if ($(window).scrollTop() + $(window).height() >= $(document).height() - 200) {
            //initate ajax here
        }
    });
});
于 2012-09-07T07:40:19.287 回答