【发布时间】:2017-01-25 09:43:36
【问题描述】:
我想在函数中调用模态。并根据点击模式的内容,我想继续我的功能。
我知道这可以通过不同的承诺或回调来完成。但我不明白该怎么做
我的功能是
$(".delete").click(function(){
/// call a modal
$(".confirm").modal();
/*
now if clicked yes in modal
then continue with my ajax call
else return false
*/
});
我期待一个延迟的承诺或回调答案。因为我想知道它们在这种情况下是如何工作的
【问题讨论】:
标签: javascript jquery callback promise bootstrap-modal