mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-27 20:21:56 +01:00
38 lines
859 B
HTML
38 lines
859 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>jQuery.getJSON demo</title>
|
|
<style>
|
|
img {
|
|
height: 100px;
|
|
float: left;
|
|
}
|
|
</style>
|
|
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
|
|
<script>
|
|
(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( "#images" );
|
|
if ( i === 3 ) {
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="images"></div>
|
|
|
|
</body>
|
|
</html>
|