我试图在页面上关闭Bootstrap模态后执行一些jQuery代码,我在jQuery和所有内容中都有模态的ID。我想使用某种jQuery函数,而不是有条件的if语句。这是我打开的模态,关闭后如何运行一些jQuery(动画应该是完整的,所有内容)?
<div id="part_number-modal" class="modal fade in" tabindex="-1" role="dialog" aria-labelledby="part_number-modal" aria-hidden="false" style="display: block;">
<!-- the rest of the modal HTML is in here -->
</div>
您可以使用隐藏的事件处理程序
在向用户隐藏模式后,将触发此事件(将等待CSS转换完成)。
$('#part_number-modal').on('hidden.bs.modal', function (e) {
// do something...
})
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句