function x(t){
var a = something;
$.each(a, function(index,value){
y(this);
});
}
function y(t){
$.ajax({
}).done(function(r){
if(r.success){
}
else{
}
});
// This function should be called for the second element
// in the each function only if its completed for the first element.
var a = something;
$.each(a, function(index,value){
y(this);
});
}
function y(t){
$.ajax({
}).done(function(r){
if(r.success){
}
else{
}
});
// This function should be called for the second element
// in the each function only if its completed for the first element.