Skip to content

Instantly share code, notes, and snippets.

Created May 9, 2016 20:59
Show Gist options
  • Save anonymous/270e46088c2e0324ab2430a10a79533b to your computer and use it in GitHub Desktop.
Save anonymous/270e46088c2e0324ab2430a10a79533b to your computer and use it in GitHub Desktop.
Superman // source http://jsbin.com/jezoniwane
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>Superman</title>
</head>
<body>
<img id="random">
<script id="jsbin-javascript">
$(document).ready(
function() {
$.get(
'https://api.giphy.com/v1/gifs/translate?api_key=dc6zaTOxFJmzC&s=superman',
function(response) {
console.log(response);
$('#random').attr('src', response['data']['images']['fixed_width_downsampled']['url']);
}
);
}
);
</script>
<script id="jsbin-source-javascript" type="text/javascript">$(document).ready(
function() {
$.get(
'https://api.giphy.com/v1/gifs/translate?api_key=dc6zaTOxFJmzC&s=superman',
function(response) {
console.log(response);
$('#random').attr('src', response['data']['images']['fixed_width_downsampled']['url']);
}
);
}
);</script></body>
</html>
$(document).ready(
function() {
$.get(
'https://api.giphy.com/v1/gifs/translate?api_key=dc6zaTOxFJmzC&s=superman',
function(response) {
console.log(response);
$('#random').attr('src', response['data']['images']['fixed_width_downsampled']['url']);
}
);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment