I'm lost. How might I pass a loop variable to an AJAX .done() call?
for (var i in obj) {
$.ajax(/script/).done(function(data){ console.log(data); });
}
Obviously, if I were to do console.log(i+' '+data)
i would return the very last key in the object obj
on every single iteration. Documentation fails me.
success
, but as I understand that is deprecated now. – Debt