在类carouse-inner动态添加
<div class = "active item"><img ..></div>
<div class = "item"><img ..></div>
<div class = "item"><img..</div>
并致电
$('.carousel').carousel();
在inspect元素中,carousel html是正确的,但是箭头上的滑动点击不起作用。 我认为bootstrap carousel不是init。
答案 0 :(得分:0)
尝试用此替换当前的bootstrap和jquery <script>
。将其放在</body>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>