[jQuery] How do I use getjson to make two attribute pairs
================
HERES THE TASK
================
To get the 5 newest photos from Flickr tagged with the word "light".
================
HERES THE CODE
================
<html>
<head>
<script src="../jquery.js"></script>
<script>
$(document).ready(function(){
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?
tags=light&tagmode=any&format=json&jsoncallback=?",
function(data){
$.each(data.items, function(i,item){
$("<img/>").attr("src", item.media.m).appendTo("#images");
if ( i == 4 ) return false;
});
});
});
</script>
<style>img{ height: 100px; float: left; }</style>
</head>
<body>
<div id="images"></div>
</body>
</html>
==================
HERES THE OUTPUT
==================
http://sampleswap.uk.to/json/test.html
==================
The src of the image is the item.media.m
According to the flickr api (http://www.wait-till-i.com/2007/10/22/
hacking-flickr-the-json-way/)
the href of the image is item.link.m
How do I make the images be a hyperlink to to the actual Flickr page
of the image?