【问题标题】:Dynamically loading posts with Wordpress使用 Wordpress 动态加载帖子
【发布时间】:2010-11-24 07:39:59
【问题描述】:

这个helpful idea from Andy Gaskell 支持我下一个问题的 50%:

我想使用 WordPress 动态加载帖子。使用 Andy 的函数获取它们确实有效,但是如何将负载绑定到每个帖子?

我可以在 JS 脚本中插入 PHP 生成的内容(例如,发布永久链接)吗?

谢谢。

【问题讨论】:

    标签: jquery wordpress load infinite-loop


    【解决方案1】:

    知道了:

    $("#triggerDIV a").click(function(id){
        event.preventDefault(); // prevent a element from executing
        var id = this.getAttribute('href'); // get the link
        $("#targetDIV").load(id); // load it
    });
    

    【讨论】:

      【解决方案2】:

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-09-16
        • 1970-01-01
        • 1970-01-01
        • 2012-09-02
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多