我有一个模态问题。
模态的代码是:
<div id="alert-modal-pick" class="alert alert-success hidden" role="alert">
<button type="button" class="close" onclick="$('#alert').addClass('hidden');">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<div id="alert-text-modal-pick"></div>
</div>
我想在关闭模态时清除消息。
为了实现这一点,我使用:
$('#alert-modal-pick').empty();
但不删除完整警报。
有人能帮我吗?
如果添加隐藏类?像这样:
$('#alert-modal-pick').empty().addClass("hidden");
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句