Wait until all jQuery Ajax requests are done?

后端 未结 21 1773
离开以前
离开以前 2020-11-21 04:39

How do I make a function wait until all jQuery Ajax requests are done inside another function?

In short, I need to wait for all Ajax requests to be done before I exe

21条回答
  •  北海茫月
    2020-11-21 05:42

    Also you could use async.js.

    I think its better than $.when because you can merge all kinds of asynchronous call that does not support promises out of the box like timeouts, SqlLite calls etc. and not just ajax requests.

提交回复
热议问题