Last active
August 29, 2015 14:08
-
-
Save contolini/3a7f66ab19aa1a7d4773 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function one( foo ){ | |
return $.ajax({ | |
url: foo | |
}); | |
} | |
function two( bar ){ | |
return $.ajax({ | |
url: bar | |
}); | |
} | |
$.when( one('some-data.json'), two('other-data.json') ).done(function( dataFromFunctionOne, dataFromFunctionTwo ){ | |
console.log( 'stuff from two XHR:' + dataFromFunctionOne + dataFromFunctionTwo ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment