Skip to content

Instantly share code, notes, and snippets.

Created July 25, 2016 15:55
Show Gist options
  • Save anonymous/2aaf2f62a178c61ae4797dc12e159d67 to your computer and use it in GitHub Desktop.
Save anonymous/2aaf2f62a178c61ae4797dc12e159d67 to your computer and use it in GitHub Desktop.
Giphy Mini-Activity // source http://jsbin.com/gunijo
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>Giphy Mini-Activity</title>
</head>
<body>
<div id="gif"></div>
<script id="jsbin-javascript">
var typeOfGif = "dogs";
$(document).ready(function() {
$.get(
"http://api.giphy.com/v1/gifs/search?q=cats&api_key=dc6zaTOxFJmzC",
function(response) {
console.log(response);
$("#gif").append("<img src=" + response.data[0].images.fixed_width_downsampled.url + ">");
});
});
</script>
<script id="jsbin-source-javascript" type="text/javascript">var typeOfGif = "dogs";
$(document).ready(function() {
$.get(
"http://api.giphy.com/v1/gifs/search?q=cats&api_key=dc6zaTOxFJmzC",
function(response) {
console.log(response);
$("#gif").append("<img src=" + response.data[0].images.fixed_width_downsampled.url + ">");
});
});
</script></body>
</html>
var typeOfGif = "dogs";
$(document).ready(function() {
$.get(
"http://api.giphy.com/v1/gifs/search?q=cats&api_key=dc6zaTOxFJmzC",
function(response) {
console.log(response);
$("#gif").append("<img src=" + response.data[0].images.fixed_width_downsampled.url + ">");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment