I have a super simple JQuery ajax request below:
$.ajax("../ajax/data/items.json",
{ success: setContent, type: "GET", dataType: "json" });
function setContent(data, status, jqxhr) {
alert("Hello!");
}
The json loads on the page with a 200 response. The success function is set to setContent(). But the success function never runs and I cannot figure out why.
Questions:
Is my understanding of how the success function works incorrect? Why doesn't the function setContent() run for a 200 response on the Json?
Are the arguments for setContent() filled out behind the scenes by JQuery? Obviously I am not setting it anywhere in the code, but the video does not show adding arguments any place.
I am following Lynda.com's tutorial:
http://www.lynda.com/jQuery-tutorials/AJAX-made-simple/183382/368483-4.html
specifically the video AJAX made Simple.

successhandler called, install anerrorhandler and see what it tells you the error is.