I have referred the following links
Multiple ajax calls inside a each() function.. then do something once ALL of them are finished?
Coordinating multiple ajax requests with jquery.when
I want to use jquery.when method in foreach loop. So want to know about parameters in the following code
$.when.apply($, calls).then(function(call1, call2, call3) {
});
Suppose var calls = [];
is a array of 3 get ajax calls. So in above is it necessary to provide 3 parameters like call1, call2, call3
or all these 3 calls can be combined into one parameter call
as follows?
$.when.apply($, calls).then(function(call) {
});