我正在使用Twitter Bootstrap创建一个模态窗口.默认行为是,如果单击模态区域外,模态将自动关闭.我想禁用它 - 即在模态外部单击时不关闭模态窗口.
有人可以共享jQuery代码来做到这一点吗?
我正在制作一个引导程序网站,有几个Bootstrap'Modals'.我正在尝试自定义一些默认功能.
问题是这个; 您可以通过单击背景关闭模态.无论如何禁用此功能?仅限于特定模态?
我在这里有一个Bootply测试设置:http://bootply.com/67311
当我单击"X"或"关闭"按钮时,它按预期工作.但是,我希望它在用户遇到转义时关闭/关闭,或者在模态对话框外单击.
我该怎么做呢?
尝试在codeignitor中为登录页面创建一个永久显示Bootstrap模式的视图.我可以通过添加按钮获得模态弹出窗口,但我不知道如何在页面加载时默认显示模式.
我从文档中复制并粘贴了以下内容但页面上没有显示任何内容,它只显示在源代码中.
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
Run Code Online (Sandbox Code Playgroud)