引导程序3上未调用模态 [英] Modal not being called on bootstrap 3
问题描述
我有以下代码:
<div class="btn slick-slide slick-active" data-toggle="modal" data-target="#photo-carousel-modal" data-slick-index="0" aria-hidden="false" style="width: 234px;">
<img class="img-holder img-thumbnail" src="image/path.jpg">
</div>
应该在这里使用这种模式:
That was supposed to call for this modal here:
<div class="modal fade bs-example-modal-lg" id="photo-carousel-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
{{-- Modal's content --}}
</div>
</div>
</div>
它根本不会触发任何东西!我是在做一些愚蠢的事情,还是没有意识到吗?
It simply not triggers anything! Am I doing some stupidity and not realizing it?
附言:是的! Bootstrap正常运行.我在代码的其他部分中使用了它,它的工作原理就像一个魅力!
P.S.: YES! The Bootstrap does work properly. I'm using it in other parts of the code and it works like a charm!
推荐答案
确保您的bootstrap.js
文件被命名为 AFTER 后,您的jQuery文件如下:
Make sure your bootstrap.js
file is called AFTER your jQuery file like this:
<script src="path/to/jquery-file.js"></script>
<script src="path/to/bootstrap.js"></script>
(此外,请删除所有其他bootstrap js文件,例如bootstrap-modal.js等,因为bootstrap.js已经包含了所有内容)
(Also, remove any other bootstrap js file like bootstrap-modal.js, etc as bootstrap.js has everything in it already)
如果上述操作已完成但仍未显示,请在问题中张贴<head....</head
中的代码和网页的页脚.
If the above is already done and it still is not showing, please post the codes from your <head....</head
and the footer of your webpage on your question.
PS .检查您的浏览器控制台中是否有错误,以便您更好地了解发生的情况.
P.S. Check your browser console for errors so you can get a better idea on what is going on.
这篇关于引导程序3上未调用模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!