Skip to content

Instantly share code, notes, and snippets.

@LuisMDeveloper
Created February 5, 2014 00:08
Show Gist options
  • Save LuisMDeveloper/8815026 to your computer and use it in GitHub Desktop.
Save LuisMDeveloper/8815026 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div></div>
</body>
</html>
(function() {
var flickerAPI = "http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?";
$.getJSON( flickerAPI, {
tags: "mount rainier",
tagmode: "any",
format: "json"
})
.done(function( data ) {
$.each( data.items, function( i, item ) {
$( "<img>" ).attr( "src", item.media.m ).appendTo( "div" );
if ( i === 3 ) {
return false;
}
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment