bootstrap旋转木制不初始化



在类carouse-inner动态添加

<div class = "active item"><img ..></div>
<div class = "item"><img ..></div>
<div class = "item"><img..</div>

并致电

$('.carousel').carousel();

在Inspect元素中,轮播HTML是正确的,但是在箭头上滑动单击不起作用。我认为bootstrap旋转旋转木马不是初始化。

尝试用此替换当前的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>

最新更新