Revision: 52794
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 1, 2011 15:09 by jackkeller
Initial Code
$(document).ready(function() { Â Â Â Â $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=35591378@N03&format=json&jsoncallback=?", function(data) { Â Â Â Â Â Â Â Â var target = "#latest-flickr-images ul"; // Where is it going? Â Â Â Â Â Â Â Â for (i = 0; i <= 9; i = i + 1) { // Loop through the 10 most recent, [0-9] Â Â Â Â Â Â Â Â Â Â Â Â var pic = data.items[i]; Â Â Â Â Â Â Â Â Â Â Â Â var liNumber = i + 1; // Add class to each LI (1-10) Â Â Â Â Â Â Â Â Â Â Â Â $(target).append("<li class='flickr-image no-" + liNumber + "'><a title='" + pic.title + "' href='" + pic.link + "'><img src='" + pic.media.m + "' /></a></li>"); Â Â Â Â Â Â Â Â } Â Â Â Â }); });
Initial URL
Initial Description
Initial Title
Show Most Recent Flickr Uploads
Initial Tags
jquery
Initial Language
JavaScript