flickr Gallery with jquery

[javascript]
//jquery galeria flickr
$(document).ready( function() {
var Cont = $(‘<ul>’).appendTo(‘.fotos’);
var ifo = {
Api : ‘e1d93e6672aba8ab2604cb2esds’, //flickr api
Set : ‘72157605835043241’, //foto set
fLink : ‘http://www.flickr.com/photos/user/’,
Cant : 2
};
$.getJSON(‘http://api.flickr.com/services/rest/?format=json&jsoncallback=?&api_key=’+ifo.Api+’&method=flickr.photosets.getPhotos&photoset_id=’+ifo.Set+’&per_page=’+ifo.Cant, function(Data){
if (Data.stat == "ok"){
for (var i=0; i<Data.photoset.photo.length; i++){
var photo = Data.photoset.photo[i];
var Thum = ‘http://farm’+photo[‘farm’]+’.static.flickr.com/’+photo[‘server’]+’/’+photo[‘id’]+’_’+photo[‘secret’]+’_’+’s.jpg’;
Cont.append(‘<li><a href="’+ifo.fLink+photo[‘id’]+’/in/set-‘+ifo.Set+’" title="’+photo[‘title’]+’"><img src="’+Thum+’" alt="’+photo[‘title’]+’" /></a></li>’);
};
}
});
});
[/javascript]

Leave a Reply