Skip to content

Instantly share code, notes, and snippets.

@michael
Created April 27, 2009 14:49
Show Gist options
  • Select an option

  • Save michael/102529 to your computer and use it in GitHub Desktop.

Select an option

Save michael/102529 to your computer and use it in GitHub Desktop.
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=27301942@N06&lang=en-us&amp&format=json&jsoncallback=?", function(data){
$.each(data.items, function(i,item){
$("<div/>").addClass("photo").append($("<a alt=\"huhuh\"/>").attr("href", "#photo_"+i).append($("<img/>").attr("src", item.media.m).attr("alt", "huhuh"))).appendTo("#photos");
$("<div/>").attr("id", "photo_"+i).addClass("photo").append($("<img/>").attr("src", item.media.m.replace("_m","")).attr("alt", "huhuh")).append("<p>Beschriftung</p>").appendTo("#photos");
if ( i == 2 ) return false;
});
$('div.photo a').fancyZoom({scaleImg: true, closeOnClick: true});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment