I have following question. With jQuery.when we can execute something when several asynchronous requests is finished. This is some example code (I have taken it from jQuery site):
$.when( $.ajax( "/page1.php" ), $.ajax( "/page2.php" ) ).done(function( a1, a2 ) {
// other code
});
But I want to dynamically add something to this clause:
$.ajax( "/page1.php" ), $.ajax( "/page2.php" )
For example $.ajax( "/page3.php" ) or remove $.ajax( "/page2.php" ). Is this is possible? I would be very grateful for any comment.
Best regards.