我创建了一个模态对话
<a href="#myModal" role="button" class="btn" data-toggle="modal" id="LaunchDemo">Launch demo modal</a>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
</div>我刚从..调用了模式。
$("a#LaunchDemo").click();但是这个模式只是屏幕上的blinking,我也通过点击按钮调用了这个模式,我遇到了问题,我哪里出错了?,请帮助..
发布于 2013-02-17 07:46:37
当DOM完全加载时,您需要执行javascript代码。使用modal而不是click
$(document).ready(function() {
$('#LaunchDemo').modal(options)
});演示:http://jsfiddle.net/MgcDU/1998/
发布于 2013-07-20 19:25:50
当模型的with太大时,这是错误的。
在bootstrap文件{width:900}中设置modal类的样式表时可以尝试
它会发生的..。
发布于 2013-02-17 07:45:13
删除hyperlink标记中的href="#myModal",因为它试图将您链接到页面的一部分。
此外,您不应该需要在选择器中指定元素类型。只按ID搜索元素会更快。
https://stackoverflow.com/questions/14916390
复制相似问题