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.
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
closeclass. (class="close").Also, consider upgrading to the newer bootstrap version to enjoy many bugfixes and new features.