我在循环内调用了甜蜜警报功能,但甜蜜警报只显示一次,我认为它覆盖了以前的甜蜜警报,bcz 当我执行简单警报时它确实弹出两次,但甜蜜警报只显示我一次时间。我想要做的是当我点击确定或取消按钮时发出甜蜜警报以显示第二个或第三个警报,否则不会根据循环迭代显示第二个或下一个警报这是我的代码
$.each(data,function(index,elem){
NotificationPopUpIsApprove();
});
function NotificationPopUpIsApprove(){
swal({
title: "Are you sure?",
text: "The Task "+ task_name + " In Project " + project_name + "is Completed by " + uname ,
type: "warning",
confirmButtonText: "Approve!",
closeOnConfirm: false,
confirmButtonColor: "#44E753",
cancelButtonText: "Reasssign!",
showCancelButton: true,
},
function(isConfirm){
if (isConfirm === true) {
return true;
}else{
return false;
}
});
}
提前致谢..