【问题标题】:Instafeed js, which div to render instafeedInstafeed js,要渲染 instafeed 的 div
【发布时间】:2017-06-13 11:45:47
【问题描述】:

大家好,我目前正在与instafeed.js 合作,我正在尝试确定是否可以确定应该在哪个div 中呈现图像:

现在我只使用标准的<div id="instafeed"></div>,但我希望能够执行以下操作:

<div id="instafeed-1">Instagram feed with a specific tag</div>
<div id="instafeed-2">Instagram feed with a specific user</div>
<div id="instafeed-3">Instagram feed with a different configuration</div>

【问题讨论】:

    标签: javascript html instafeedjs


    【解决方案1】:

    您可以使用 target 选项指定另一个 id。例如:

    var feed = new Instafeed({ target: 'instafeed-1', get: 'tagged', tagName: 'awesome', clientId: 'YOUR_CLIENT_ID' }); feed.run();

    更多选项请参考文档:https://github.com/stevenschobert/instafeed.js/blob/master/README.md#standard-options

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多