猫头鹰旋转木马不工作。已经添加了一个js库

时间:2016-03-03 08:47:16

标签: owl-carousel

嗨我在我的网站上有这个猫头鹰旋转木马,我的问题是我已经加载了猫头鹰旋转木马js库,它似乎不起作用,不知道是什么问题。这是我的代码

<!-- PARALLAX -->
            <section class="parallax parallax-2" style="background-image: url('<?php echo base_url();?>assets/images/particles_bg.jpg');">

                <div class="container">
                    <div class="owl-carousel text-center owl-testimonial nomargin" data-plugin-options='{"singleItem": true, "autoPlay": 3000, "navigation": false, "pagination": true}'>

                        <div class="text-center">
                            <h3 class="nomargin">Popular Products</h3>
                            <p class="font-lato weight-300 lead nomargin-top">Incidunt deleniti blanditiis quas aperiam recusandae consequatur ullam.</p>
                        </div>

                        <div class="text-center">
                            <h3 class="nomargin">New Products</h3>
                            <p class="font-lato weight-300 lead nomargin-top">Incidunt deleniti blanditiis quas aperiam recusandae consequatur ullam.</p>
                        </div>

                    </div>


                </div>


            </section>
            <!-- /PARALLAX -->

图书馆

<link rel="stylesheet" href="<?php echo base_url();?>assets/css/owl.carousel.css">
        <link rel="stylesheet" href="<?php echo base_url();?>assets/css/owl.theme.css">
   <script type="text/javascript" src="<?php echo base_url();?>assets/js/owl.carousel.min.js"></script>

有人可以帮我解决这个问题吗?我坚持这个。任何帮助都非常感谢。 TIA

1 个答案:

答案 0 :(得分:0)

你必须在你的js代码中调用插件...在你的情况下你应该调用它 在你的main.js中加载所有的libs,所以如果你没有创建main.js,创建它并以适当的方式调用插件(你还应该包含jquery库): $(&#39; .owl传送带&#39)。owlCarousel();

http://owlgraphic.com/owlcarousel/#more-demos

owl-carousel的官方页面。

相关问题