$(document).on("click", ".animal-button", function() {
var type = $(this).attr("data-type");
var queryURL = "http://api.giphy.com/v1/gifs/search?q=" + type + //API KEY & PARAMETERS THAT LIMIT RESPONSE DATA TO AMOUNT YOU WANT;
$.ajax({
url: queryURL,
method: "GET"
})
.done(function(response) {
var results = response.data;
console.log(results);
}
Created
October 16, 2017 19:18
-
-
Save mstorino/377f3773376a93a4ead654355dcb6062 to your computer and use it in GitHub Desktop.
API / AJAX Overview
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment