Skip to content

Instantly share code, notes, and snippets.

@flowmar
Created February 20, 2024 03:24
Show Gist options
  • Save flowmar/8802476e3d60a1c8783aefb3114636de to your computer and use it in GitHub Desktop.
Save flowmar/8802476e3d60a1c8783aefb3114636de to your computer and use it in GitHub Desktop.
Execute a function when both ajax requests are complete. From http://api.jquery.com/jQuery.when/
$.when( $.ajax( "/page1.php" ), $.ajax( "/page2.php" ) ).done(
function( a1, a2 ) {
// do something
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment