Skip to content

Instantly share code, notes, and snippets.

@Bijesse
Forked from anonymous/index.html
Created July 25, 2016 15:56
Show Gist options
  • Save Bijesse/123a380b15b8fb9abfc1a817de4ebe7a to your computer and use it in GitHub Desktop.
Save Bijesse/123a380b15b8fb9abfc1a817de4ebe7a 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