Well after extensively web searches and several years of failing to understand documentation and finding alternative solutions, I've come to you to ask how I should go about my problem.
Note: Each AJAX request has a unique success function.
One of the suggested similar questions was - How to loop through Ajax Requests inside a JQuery When - Then statment? - is this similar to what I need, albeit the incompatibility with my unique success callbacks?
$.when(
$.ajax({
url: '/-.json',
method: 'get',
dataType: "jsonp",
complete: function(r) {
//my stuff
}
}),
$.ajax({
url: '/-.json',
method: 'get',
dataType: "jsonp",
complete: function(r) {
//my stuff
}
})
).then(function() {
console.log('leggo');
});
I based my solution on CSS-Tricks article but console.log is never fired, though the AJAX requests are.
Thanks