1 回答

TA贡献1828条经验 获得超13个赞
您正在绑定事件多时间。
单击时,您应该只打开模式。不绑定。绑定应该做一次。
$('#reveal_AddSenderMod').on('click', function() {
$('.modal.fade.modal-style2').modal('show');
})
$('.modal.fade.modal-style2').on('shown.bs.modal', function() {
$(this).find('.modal-body').find('#loadURL').load('./loadPage.html').fadeIn('slow');
return false;
});
//一些伪代码
$('body').on('click', '#on-submit-senderid', function() {
if(localStorage.getItem("review_submitte")) {
return;
}
if(!$('input[name="sender_id_confirm"]').is(':checked')) {
mkNoti(['Ops!'],['Please agree the condition to get Custom Sender ID'],{ sound: true, status:['danger'],dismissable: false });
return;
} else {
$.ajax({
...
success: function(response) {
if (response.status == 'success') {
//SUCCESS
return false;
} else {
mkNoti([response.title],[response.message],{ sound: true, status:[response.status],dismissable: false });
return false;
}
localStorage.setItem("review_submitte", "true")
}
});
hide_loader();
return false;
}
});
添加回答
举报