使用Infinite Scroll请求Tumblr类似按钮状态

时间:2017-02-25 14:33:43

标签: javascript jquery tumblr infinite-scroll

我正在使用这个Infinite-Scroll JQuery插件,我在为下一个帖子请求类似按钮状态时遇到问题,正如在Tumblr docs中提到的,我需要使用Tumblr.LikeButton.get_status_by_page(n)Tumblr.LikeButton.get_status_by_post_ids([n,n,n]),我尝试过解决方案hereherehere。什么都行不通。

这是code,我需要在ajax返回ajax召回后调用Tumblr.LikeButton.get_status_by_post_ids([n,n,n])

这是重要的部分:

$.infinitescroll = {     
        defaults      : {
                          debug           : false,
                          preload         : false,
                          nextSelector    : "div.navigation a:first",
                          loadingImg      : "http://www.infinite-scroll.com/loading.gif",
                          loadingText     : "<em>Loading the next set of posts...</em>",
                          donetext        : "<em>Congratulations, you've reached the end of the internet.</em>",
                          navSelector     : "div.navigation",
                          contentSelector : null,           // not really a selector. :) it's whatever the method was called on..
                          extraScrollPx   : 150,
                          itemSelector    : "div.post",
                          animate         : false,
                          localMode      : false,
                          bufferPx        : 40,
                          errorCallback   : function(){}
                        }, 
        loadingImg    : undefined,
        loadingMsg    : undefined,
        container     : undefined,
        currPage      : 1,
        currDOMChunk  : null,  // defined in setup()'s load()
        isDuringAjax  : false,
        isInvalidPage : false,
        isDone        : false  // for when it goes all the way through the archive.
};

0 个答案:

没有答案