I have some downtime at the moment so I wanted to get back to coding a little bit. One of the things I've been wanting to mess around with for some time is the Flickr API, mainly because I upload a boatload of pics to the service.<a href="http://www.wait-till-i.com/2007/10/22/hacking-flickr-the-json-way/"> Chris Heilmann posted a really great tutorial on pulling back pics using JSON and plain ole JavaScript</a>. I have to admit that it was insanely easy and Chris, as always, did a great job of breaking it down. I made a few tweaks since, as he mentioned, document.write isn't the best choice for outputting and the code was trivial:

<code>
function jsonFlickrFeed(o){
var i = 0, mainDiv = "", foo = "";
mainDiv = document.getElementById( "main" );
while(o.items[i]) {
foo = document.createElement( "img" );
foo.setAttribute( "src", o.items[i].media.m );
main.appendChild( foo );
i++
}
}</code> 

So I wanted to do this in jQuery just to see what it would look and had a "woah" moment:

<code>
function jsonFlickrFeed(o){
var mainDiv = $( "#main" );
$.each( o.items, function( index, node ) {
	$( "&lt;img /&gt;" ).attr( "src",  node.media.m ).appendTo( mainDiv );
} );
}</code>

It was kind of a reminder of the feeling I had when I first jumped into jQuery back in 2006 where the brevity, power & simplicity just amazed me. 
