The context of this
has changed by the time that retry()
function executes, and is no longer the AJAX info. You should, however, be able to wrap it in a closure by using a variable:
var self = this;
var retry = function () {
$.ajax(self);
};
(Note that this whole context is itself also happening in a callback, error
. So if this
still isn't what you need it to be, you may need to apply this same concept another scope higher.)