I'm working on a feature for my work and I've come to a crossroads. I'm completely new to Ajax, and am trying to implement a queue to manually handle the Ajax requests as opposed to the browser. I've done some research and looked at this answer, however the requests I'm going to be sending won't be declared beforehand, as the whole website is dynamic. Is there a way of using the code there in tandem with the JQuery.when() function described here? I was thinking along the lines of:
$.when(d1).done(function(var d2=$.Deferred()) {
d2.resolve();
}
d1.resolve();
However this implementation is not working for me. Thanks for any help I can get!