如何使用无止境滚动jQuery插件

如何使用无止境滚动jQuery插件,jquery,Jquery,滚动jQuery插件。一切正常,但我不明白停火的选择 10次之后我不想再打电话了 $(document).endlessScroll({ fireOnce: true, fireDelay: 3000, bottomPixels: 750, insertAfter: "ul#articlePagedList li:last", loader: "<div id='processing'><img src='${pageContext.re

滚动jQuery插件。一切正常,但我不明白停火的选择

10次之后我不想再打电话了

$(document).endlessScroll({
    fireOnce: true,
    fireDelay: 3000,
    bottomPixels: 750,
    insertAfter: "ul#articlePagedList li:last",
    loader: "<div id='processing'><img src='${pageContext.request.contextPath}/images/buttons/icon_busy.gif' alt='<spring:message code='commonMessages.loading' />' /></div>",
    callback: function(i) {
        getArticlesEndlessScroll('articlePagedList' ,'${articleListUrl}', i);
    }
});

回调
不接收任何参数。看。因此,在函数中,
i
可能未定义

另外,这可能只是一个输入错误,但请确保在
停火
中包含第二个
e

例如:

ceasFire: function(i) { if (i==10) return true; }
var noneLeft = false;

$(".scroller").endlessScroll({
    callback: function() {
        $.getJSON("load_more", function(items){
            noneLeft &= items.count > 0;

            ...add items to page...
        });
    },
    ceaseFire: function() {
        return noneLeft;
    }
});