【发布时间】:2015-06-11 01:41:01
【问题描述】:
我正在开发我的投资组合网站,但在让模态运行时遇到问题。我首先保持简单,只是将这个功能编码为普通的 html5。
这是代码:
<div class="main-information">
<div class="main">
<img src="images/profile.JPG"/>
<div class="info">
<h2 class="text-primary">FRANCISCO GOITIA</h2>
<h3 class="text-primary">SOFTWARE DEVELOPER</h3>
</div>
</div>
<div class="links">
<ul class="list-inline">
<li>
<a class="btn" href="#" data-toggle="modal" data-target="#heroku">Heroku</a>
</li>
<li>
<a class="btn" href="https://github.com/frangoitia" target="_blank">GitHub</a>
</li>
<li>
<a class="btn">Curriculum Vitae</a>
</li>
</ul>
</div>
</div>
<div class="modal fade" id="heroku" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<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" id=""></h4>
</div>
<div class="modal-body">
<p>
The following are some applications I have built and deployed to Heroku. The code for this projects, as well as the code for many more projects and massive open online courses I've taken, can be access in my Github repo:
</p>
<ul class="list-unstyled">
{{#each model as |application|}}
{{heroku-app application=application}}
{{/each}}
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary"></button>
</div>
</div>
</div>
</div>
Bootstrap 正常工作,否则。
谢谢。
【问题讨论】:
-
你能确认你已经为 Bootstrap 加载了 JS 吗?您可以尝试在检查器控制台中查找对象,然后查看是否会自动完成任何 BS JS 方法。例如,
window.$modal = $('.modal'),然后是$modal.modal('show')。如果它已加载,键入$modal.mo应在自动完成中显示modal。此外,如果 JS 存在,上述代码将以编程方式打开您的模式。 -
这可能正是您所说的 Bootstrap 运行成功,但只是想确认一下。
-
如果模态打开了,但是
each区域没有内容,那么Ember中发生了一些奇怪的事情。
标签: javascript twitter-bootstrap ember.js modal-dialog