Skip to content

Instantly share code, notes, and snippets.

@kdefliese
Created June 12, 2015 05:31
Show Gist options
  • Save kdefliese/36d51dc381836de36321 to your computer and use it in GitHub Desktop.
Save kdefliese/36d51dc381836de36321 to your computer and use it in GitHub Desktop.
quiz_6_question_5
// using a get ajax request to access the JSON endpoint created in question #4
$.get("http://localhost:3000/cats", function(response) {
// replacing the text of the element with id="putCatHere" with the JSON data that is returned from the endpoint
$("#putCatHere").text(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment