这是我的代码
var callbacks = $.Callbacks();
callbacks.add(BindRecipient);
callbacks.add(dummy);
callbacks.fire();
function BindRecipient()
{
//asynchrously call to database for fetching some data.No callback is available here in this code.
}
function dummy()
{
alert("Hazza");
}
当我执行代码时,我在从第一个方法调用获取数据之前收到警报我希望仅在 BindRecipient 完成执行时才调用第二个方法