jQuery deferred object with nested ajax calls

后端 未结 3 2005
一向
一向 2020-12-28 17:35

I have a situation in which my ajax calls must perform in a particular order. I have used jQuery Deferred objects in other situations, but cannot seem to find a way to make

3条回答
  •  时光说笑
    2020-12-28 17:48

    Couldn´t add a comment for some reason to the above answer.

    So i add my comment here. The above answer will only work if the ajax calls are fast and returns BEFORE the return dfd.promise().

    I have the same problem. And as you can see. The returned deferred object states that it is "pending": http://jsfiddle.net/BtEKa/

提交回复
热议问题