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