【发布时间】:2014-08-20 11:57:53
【问题描述】:
我想在 $.each 完成后执行一些操作。
$.each(someArray, function(index, val) {
//---------some async ajax action here per loop ---------
$.ajax({...}).done(function(data){...});
}.promise().done(function(){...}); //<-------error here can't use with $.each
- 并非每个 jQuery 函数 都有
promise()? - 我如何知道 $.each 数组何时完成?
- 我可以将 someArray 更改为 $someArray 来使用它吗?
【问题讨论】: