【问题标题】:Instafeed plugin Load More button is not workingInstafeed 插件加载更多按钮不起作用
【发布时间】:2014-12-09 09:09:03
【问题描述】:

我正在使用 instafeed js 插件并尝试使用加载更多按钮,但它不起作用。我在这里看到了同样问题的帖子,但很抱歉仍然不适合我。有什么帮助吗?谢谢

这是我的代码

         var feed = new Instafeed({
        get: 'user',
        userId: 300087,
        accessToken: '300087.467ede5.6af355f8b6c048b2bbfc6772ab918cf9',
        link: 'true',
        resolution: 'standard_resolution',
        limit: '20'
        });

        // call feed.next() on button click
         $('#load-more').on('click', function() {
         feed.next();
         });

        // run our feed!
         feed.run();

在html页面中

          <a id="load-more">load more</a>

【问题讨论】:

标签: javascript jquery instafeedjs


【解决方案1】:

您需要将“之后”部分添加到您的 Feed 变量中

after: function() {
    if (!this.hasNext()) {
        moreButton.hide();
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-18
    • 1970-01-01
    • 2015-02-05
    • 1970-01-01
    • 1970-01-01
    • 2019-04-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多