【发布时间】:2014-01-29 15:15:51
【问题描述】:
我正在使用 bootstrap 3 框架。我创建了一个模态窗口,它打开得很好,我单击关闭按钮,没有任何反应。我在模态窗口外单击,它会关闭并返回我的网页。我无法让关闭按钮工作。我试过'隐藏''切换'......什么都没有。任何见解都非常感谢!
> <div class="person"> <h2>Person name</h2> <p><a href="#"
> id="John-bio" class="position"> John Smiths Bio</a></p>
> <div class="modal hide" id="John">
> <div class="modal-header"> <h1> John Smith Bio</h1> </div>
> <div class="modal-body"> <p>With more than...</div>
> <div class="modal-footer"> <a href="#" class="btn">Close</a> </div>
> $(function() {
> $("#John-bio").click(function(e) { e.preventDefault();
> $("#John").modal('show'); }); });
【问题讨论】:
标签: javascript twitter-bootstrap