0346Name_Not_Found
2018/07/27(金) 01:28:58.02ID:???https://api.jquery.com/jquery.when/
> $.when( $.ajax( "/page1.php" ), $.ajax( "/page2.php" ) )
> .then( myFunc, myFailure );
https://www.tam-tam.co.jp/tipsnote/javascript/post5807.html
> 「複数の非同期処理が全部終わったら、続く処理を行う」というのがすっきり書けます。
>
> $.when(
> $.getJSON('a.json'),
> $.getJSON('b.json')
> )
> .done(function(data_a, data_b) {
> // すべて成功した時の処理
> console.log(data_a, data_b);
> })
> .fail(function() {
> // エラーがあった時
> console.log('error');
> });