[英]Modal won't close - Twitter Bootstrap 1.40
I'm using Bootstrap 1.40 and whilst my modal opens without any problem, I can't seem to close it using the button I have included in the modal it self. 我正在使用Bootstrap 1.40,虽然我的模式打开没有任何问题,但似乎无法使用自己包含在模式本身中的按钮来关闭它。
This is the code I am using to close it: 这是我用来关闭它的代码:
<a href="#" data-dismiss="modal-from-dom" ><img src="images/cancel_btn.png" alt="" border="0" align="absmiddle" /></a>
and this is the code for the modal: 这是模式的代码:
<div id="modal-from-dom" class="modal hide fade">
<div class="modal-body">
<div align="center"><img src="images/icon_wait.gif" alt="" border="0" /></div>
<h5 class="logout_h5" >Blah blah</h5>
</div>
<div class="modal-footer" >
<a href="#" data-dismiss="modal-from-dom" ><img src="images/cancel_btn.png" alt="" border="0" align="absmiddle" /></a>
</div>
</div>
<button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
A modal closing element should have the close
class. 模态结束元素应具有
close
类。 ( class="close"
). (
class="close"
)。
Also, consider upgrading to the newer bootstrap version to enjoy many bugfixes and new features. 另外,请考虑升级到较新的引导程序版本,以享受许多错误修复和新功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.