jQuery Ajax Methods Not Returning XHR Object
- by Nate
UPDATE: I haven't figured out what's going on, but this definitely seems to be a problem with my project. After creating a simple test page, I was able to verify that getJSON does in fact return an XHR object like it's supposed to.
Per the stackoverflow question/answer here: Kill ajax requests using javascript using jquery. and a number of other question/answers on this site and others, the jQuery Ajax methods should return the XHR object.
However, when I run the following code, request is "undefined".
var request = $.getJSON(url, function(data) {
console.log(data);
});
console.log(request);
Did I miss a change in jQuery? I'm using 1.4.4.