How to chain ajax calls using jquery

前端 未结 6 840
执笔经年
执笔经年 2020-11-28 22:14

I need to make a series of N ajax requests without locking the browser, and want to use the jquery deferred object to accomplish this.

Here is a simplified example w

6条回答
  •  一生所求
    2020-11-28 22:27

    I'm not exactly sure why you would want to do this, but keep a list of all of the URLs that you need to request, and don't request the next one until your success function is called. I.E., success will conditionally make additional calls to deferred.

提交回复
热议问题