尝试在 Twitter Bootstrap 2.1 中实现一个简单的模式时,我遇到了一个奇怪的错误:模式窗口按原样出现,一切似乎在一瞬间完美,然后.modal-body
div 的内容消失了。当我查看 HTML 时,它存在一秒钟然后实际上被删除,包含p
标签和所有内容,只留下一个空
<div class="modal-body"> </div>
这是我的模式切换按钮和模式窗口的代码:
<a type="button" href="#" class="btn btn-danger" data-target="#modal_confirm_delete" data-toggle="modal">Delete</a>
<div class="modal hide fade" id="modal_confirm_delete">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Modal title</h3>
</div>
<div class="modal-body">
<p>Modal body. This stuff is getting removed for some reason</p>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-cancel" data-dismiss="modal">Cancel!</a>
<a href="#" class="btn btn-danger">Continue...</a>
</div>
</div>