Twitter Bootstrap Modal示例对我不起作用

时间:2013-07-05 06:24:19

标签: jquery twitter-bootstrap modal-dialog

这是我打算运行的代码:the second example of Modals

但即使是在jsfiddle,它也不起作用:link

<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">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 class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>

1 个答案:

答案 0 :(得分:3)

除了您已经引用的bootstrap.js文件之外,您缺少对bootstrap.min.jsbootstrap.min.css的引用。

查看此更新后的工作小提琴http://jsfiddle.net/cKH8X/2/