1
有没有办法阻止close
回调中基础显示模式的关闭?我已经尝试了return false;
和e.preventDefault();
,但都没有任何效果。防止在关闭回调中关闭基础显示
HTML:
<div id="my-modal" class="reveal-modal">
I'm a modal!
</div>
JS:
$('#my-modal').on('close', function(e) {
var ok = confirm('Are you sure you want to close this?');
if (! ok) {
e.preventDefault();
return false;
}
}