コードをハッキングし始める前に疑問に思っています。例えば:
if (blahblah) {
$.ajax("randomthingy1");
}
if (blahblahblah) {
$.ajax("randomthingy2");
}
// Use jQuery to test when they've both finished. Obviously they won't always both finish, as they might not both exist, and none of them might exist either.
$.when($.ajax("randomthingy1"), $.ajax("randomthingy2"), function (stuff) {
// foo
}
// Might produce an error, as one might not exist. But will it move on and not bother?
ただ疑問に思う。また、わざわざエラーを作成して実行を停止する場合、エラーをキャッチして続行する方法はありますか?