Javascript 引导:加载页面时未隐藏Twitter引导模式

Javascript 引导:加载页面时未隐藏Twitter引导模式,javascript,twitter-bootstrap,modal-dialog,Javascript,Twitter Bootstrap,Modal Dialog,我复制了与给定示例完全相同的代码: <-- Button to trigger modal --> <a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a> <-- Modal --> <div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labell

我复制了与给定示例完全相同的代码:

<-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<-- Modal -->
<div class="modal" id="myModal" 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 class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>

当页面第一次加载时,模态立即出现。我没有javascript来触发它。他们网站上的实时演示并非如此。是否缺少任何内容?

隐藏类添加到模式中

更新在B3中,模态已经完全修改。你不应该需要这门课


如果仍然显示,请确保您在HTML中使用了正确的语法。默认情况下,它应该隐藏。

hide
类添加到模式中

更新在B3中,模态已经完全修改。你不应该需要这门课


如果仍然显示,请确保您在HTML中使用了正确的语法。默认情况下,它应该隐藏。

有效。谢谢他们是否应该更新他们的文档?他们给出的例子和现场演示的表现有所不同。游戏进行到很晚,但想要输入。语法是我的问题。在第一个div中,我使用class=“modal fade”而不是class=“modal fade”。其他的课程有-,所以我想我只是把它放在那里了。这很有效。谢谢他们是否应该更新他们的文档?他们给出的例子和现场演示的表现有所不同。游戏进行到很晚,但想要输入。语法是我的问题。在第一个div中,我使用class=“modal fade”而不是class=“modal fade”。其他的课程都有-,所以我想我只是把它放进去了。
http://twitter.github.com/bootstrap/javascript.html#modals