【问题标题】:Infinite scroll : good callback for comment inline plugin无限滚动:评论内联插件的好回调
【发布时间】:2014-03-10 14:18:43
【问题描述】:

我使用插件 Infinite Scroll for wordpress,效果很好。 但我也使用插件 Inline Ajax Comment,它在每个帖子上以 ajax 显示 cmets。

它不适用于无限滚动中的帖子,因为脚本需要回调。

所以我使用这个回调: ajaxLoadedCallback();

因为在 inline cmets 的 script.js 中,我可以看到:

// BETA: If newly loaded Ajax content has javascript then execute.
// This helps inline-ajax-comments work if loaded by something like Infinite Scroll.
// You MUST run this callback after ajax success. see jQuery docs.

function ajaxLoadedCallback() {
  scriptx = document.getElementsByTagName("script");


scripts = new Array();
for (var idx=0; idx<scriptx.length; idx++) {

    if (jQuery(scriptx[idx]).is(".inline-comments-script")) {
        scripts.push(scriptx[idx].innerHTML);
    }

}

但是 cmets 没有加载...

有人有想法吗?

谢谢。

内联 Ajax 评论:http://wordpress.org/plugins/inline-ajax-comments/

【问题讨论】:

    标签: jquery ajax wordpress callback jquery-callback


    【解决方案1】:

    我没有你的问题的答案。但是我有一个解决你的内联评论问题的方法。检查http://annote.in,在你的博客上添加注释选项。它可以在任何平台上无缝运行,并且主要被幽灵用户采用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-01
      • 2012-02-04
      • 1970-01-01
      • 2011-06-30
      • 2011-11-19
      • 1970-01-01
      • 2011-10-02
      • 1970-01-01
      相关资源
      最近更新 更多