id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blocking	blockedby
1362	$.ajax(): pass 'settings' object to 'success' callback	Chainfire		"I'm finding I want to pass data to the complete callback quite often, and I've seen the question come over IRC a couple of times as well. Currently I have this solved by using $().ajaxSuccess, but using the success callback would be neater.

'Current way' of doing it:

{{{
$.ajax({ ..., mydata: data});
$(document).ajaxSuccess(function(event, xhr, settings) {
  if (settings.url == ...) { // check for right ajax request
    alert(settings.mydata); // do something useful instead
  }
});
}}}

It would be much better if the settings structure was passed to the complete callback as well:

{{{
$.ajax({ ..., mydata: data, success: function(data, settings) {
  alert(settings.mydata);
}});
}}}

Possibly pass the XHR object as well to make the functions more consistent with the $.ajaxXXXX callbacks. Ofcourse this would apply to the 'complete' callback in much the same way."	feature	closed	major	1.2.4	ajax	1.1.3	fixed				
