我试图让Bootsrap的模式工作,但是当我点击按钮时,我所得到的只是一个黑色屏幕,没有模式对话框出现,就像我期望的那样。我正在使用流星。Bootstrap模式不会出现在流星
这里是我的代码:
<div class="container">
<h2>Example of creating Modals with Twitter Bootstrap</h2>
<div class="modal hide fade in" id="example" style="display: none; ">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>This is a Modal Heading</h3>
</div>
<div class="modal-body">
<h4>Text in a modal</h4>
<p>You can add some text here.</p>
</div>
<div class="modal-footer">
<a class="btn btn-success" href="#">Call to action</a>
<a class="btn" data-dismiss="modal" href="#">Close</a>
</div>
</div>
<p><a data-toggle="modal" href="#example" class="btn btn-primary btn-large">Launch
demo modal</a></p>
</div>
我已经基本上获得代码:http://www.w3resource.com/twitter-bootstrap/modals-tutorial.php用于测试目的。
我创造用bootstrap编辑了一个空白流星项目,上面的代码工作正常。你有没有其他的js插件?你是如何在meteor bootstrap包中加入bootstrap的? – Akshat 2013-03-02 16:15:24
嗯,我创建了一个空白项目,它也在工作。我有包文件夹中包含的标准js插件。我也有一些其他的js插件,但它们并没有真正与bootstrap相关。我只是做流星bootstrap添加。 – kpatelio 2013-03-02 16:52:04
也许有一些冲突? jQuery是默认包含,所以你不必添加它,如果你有流星加入他们,你也并不需要他们在你的插件文件夹中。你具体有哪些?您可以尝试一次删除一个,以查找何时开始工作? – Akshat 2013-03-02 16:58:35