Search code examples
javascripthtmlinstafeedjs

Instafeed js, which div to render instafeed


Hi guys I am currently working with instafeed.js and I am trying to figure out if it is possible to determine inside which div the images should be rendered:

Right now I just use the standard <div id="instafeed"></div>, but I would like to be able to do something like the following:

<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>

Solution

  • You can specify another id by using the target option. For example :

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

    Please refer to docs for more options:https://github.com/stevenschobert/instafeed.js/blob/master/README.md#standard-options