Skip to content

@johnjosephhorton /jsonp.html
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JSONP Cats Example
<script src="http://code.jquery.com/jquery-1.4.4.js"></script> <script>
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
{
tags: "cat",
tagmode: "any",
format: "json"
},
function(data) {
$.each(data.items, function(i,item){
$("<img/>").attr("src", item.media.m).appendTo("#images");
if ( i == 3 ) return false;
});
});
</script>
<p><style type="text/css">img{ height: 100px; float: left; }</style></p>
<div id="images">&nbsp;</div>
<p><input type="text" /></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.