【发布时间】:2011-08-23 16:50:58
【问题描述】:
我有一个围绕 jquery ajax 的自定义包装函数。
custom.get = function (path, callback) {
// do other things
$.get(path, function () {
callback()
})
}
在做
$.when(custom.get(path), custom.get(path)).done(function (result1, result2) { callback})
似乎不起作用。它应该工作吗?做延迟的任何替代方案?
【问题讨论】:
标签: javascript jquery callback jquery-deferred