Instafeed.js - Sorting 24 Images into Jquery Slider

486 Views Asked by At

I'm working on using images I've pulled from Instragram through instafeed.js and adding them to a jquery slider.

The problem:

I'm not sure how to give the images a unique ID to manipulate them.

Here's a link the images pulled into my page: http://carabinercoffee.com/instagram.html

Any help or guidance would greatly be appreciated!

1

There are 1 best solutions below

1
ahmad rabbani On

You can simply add counter with the image id. e.g.

where counter is a javascript variable.

counter = 1; // it should be a global java script variable 


var userFeed = new Instafeed({
       get: 'user',
        userId: 964730407,
        accessToken: '964730407.467ede5.8e47ebe6624f4f3e9fbe5988c05b4902',
        limit: 24,
        resolution: 'low_resolution',
        template: '<a href="{{link}}"><img src="{{image}}" id='img_"+(++counter)+"'" class="test1"/></a>',
        useHttp: true ,


    });