Last active
November 1, 2016 05:19
-
-
Save debbbbie/bc942f65d9c595e43eeebb5efaddd911 to your computer and use it in GitHub Desktop.
jquery make multi ajax
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
$.when.apply $, ['/ajax/1','/ajax/2','/ajax/3'].map -> | |
$.ajax(this) | |
.done -> | |
alert('all done') |
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
$.when | |
$.get('/ajax/1'), | |
$.get('/ajax/2'), | |
$.get('/ajax/3') | |
.done -> | |
alert('all done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment