与Bootstrap一起使用时,jCarouselLite不起作用

时间:2013-09-01 07:38:21

标签: jquery html css twitter-bootstrap jcarousellite

我正在尝试使用jCarouselLite作为内容滑块,它在没有Bootstrap的情况下工作正常 我认为jQuery必须与Bootstrap冲突。

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jcarousellite_1.0.1.min.js"></script>
<div class="jCarouselLite">
    <ul>
        <li>
            <img src="img/aboutus_slider (1).png" alt="" width="195" height="350">
        </li>
        <li>
            <img src="img/aboutus_slider (2).png" alt="" width="195" height="350">
        </li>
    </ul>
</div>
<script type="text/javascript">
    $(".jCarouselLite").jCarouselLite({
        auto: 800,
        speed: 2500,
        visible: 6
    });
</script>

2 个答案:

答案 0 :(得分:0)

尝试在jquery和/或jquery.ui

之后添加bootstrap
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>

答案 1 :(得分:0)

我有同样的问题,图像似乎没有完全加载。我在使用Bootstrap 3进行一些测试后现在工作正常。尝试将jCarouselLite移动到jQuery旁边:

<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/jcarousellite.min.js"></script>
<script>
    $(window).load(function() {
        /* exclusive slide */
        $(".exclusives").jCarouselLite({
            btnNext: ".ex-next",
            btnPrev: ".ex-prev"
        });
    });
</script>
<script src="js/bootstrap.min.js"></script>

并在样式表中提供图像的宽度和高度:

.exclusives ul li img {
    margin-right: 10px;
    width: 140px;
    height: 180px;
}

希望这有帮助

相关问题