Hi, How can access index i inside of "complete" method? The following gives me just the last value of i.
var scripts = ['script1.js', 'script2.js']; for(var i=0; i<scripts.length; i++){ jQuery.ajax({ dataType: 'script', url: scripts[i], complete: function (XMLHttpRequest, textStatus) { debug('i = ' + i + ' complete: textStatus = ' + textStatus); } }); }