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 に答える