我正在使用PNotify 3和Bootstrap 3。我正在尝试使用PNotify网站上给出的示例
<button class="btn btn-default dropdown-toggle" onclick="(new PNotify({
title: 'Confirmation Needed',
text: 'Are you sure?',
icon: 'glyphicon glyphicon-question-sign',
hide: false,
confirm: {
confirm: true
},
buttons: {
closer: false,
sticker: false
},
history: {
history: false
},
addclass: 'stack-modal',
stack: {'dir1': 'down', 'dir2': 'right', 'modal': true}
})).get().on('pnotify.confirm', function(){
alert('Ok, cool.');
}).on('pnotify.cancel', function(){
alert('Oh ok. Chicken, I see.');
});" data-toggle="dropdown">Modal Confirm Dialog</button>
一切正常,但是当我单击任何按钮(确定/取消)关闭对话框时,对话框会关闭,但页面不会像单击按钮之前那样变为正常状态。
在我解决这个问题的调查过程中,我发现,当我点击按钮 PNotify 时,在下面添加一行来<body>
标记:
<div class="ui-pnotify-modal-overlay" style="display: block;"></div>
关闭对话框后 PNotify 将此代码块更改为:
<div class="ui-pnotify-modal-overlay" style="display: none;"></div>
表示显示:块更改为显示:无
但问题是即使在我的项目中关闭对话框后,PNotify 也不会进行任何更改。
任何帮助将不胜感激。