2

I am using instafeedjs to show image based on tags. i want to add functionality to it so that it will show image based on the drop-down selection

<div class="instaTagsdd">
 <select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select> </div>

http://codepen.io/anon/pen/VLpwoo

4

1 回答 1

2

Add the following jQuery snippet:

$('select').change(function() {
    feed.options.tagName = this.value;
    $('#' + feed.options.target).empty();
    feed.run();
});

See Codepen

于 2015-06-02T06:37:09.387 回答