Jquery の Simple Modal を使用していますが、機能していません。はい/いいえボックスがポップアップしますが、いいえの場合は問題ありません。しかし、変更を保存するためにはいを押すと、ボックスが消えて処理が続行されません。
誰かが私が間違っていることを教えてもらえますか? ありがとう、
シンプルなモーダル コード:
function YesNoBox(message, callback) {
$('#confirm').modal({
position: ["20%",],
overlayId: 'confirm-overlay',
containerId: 'confirm-container',
onShow: function (dialog) {
var modal = this;
console.log(dialog)
$('.message', dialog.data[0]).append(message);
// if the user clicks "yes"
$('.yes').click(function () {
return true;
modal.close();
});
// if the user clicks "no"
$('.no').click(function () {
modal.close(); // close the dialog
});
}
});
}
それへの呼びかけ...
function Logout()
{
var agree=confirm("Are you sure you want to Exit WOTTS?");
if (agree)
return true;
else
return false;
}