默认猫头鹰轮播点不显示

时间:2019-01-16 03:47:59

标签: owl-carousel

我创建了一个自定义的猫头鹰点。它工作正常,但没有显示猫头鹰轮播默认点。我听不懂这是我的脚本:

`jQuery(document).ready(function ($) {
    "use strict";

    /*** =====================================
     * Testimonial Slider
     * =====================================***/
    $('.testimonial_slider').owlCarousel({
        items: 1,
        autoHeight: true,
        autoplay: true,
        center     : true,
        dots: true,
        addClassActive: true,
        loop: true,
        nav: false,
        dotsContainer : '.custom_owl_carousel',
    }); 


    /*** =====================================
     * Custom Owl-carousel
     * =====================================***/

    $('.custom_owl_carousel > li').on('click', function(){
        $('.custom_owl_carousel > li.active').removeClass('active');
        $(this).addClass('active');
    });

    var action = false, clicked = false;
    var Owl = {
        init: function() {
          Owl.carousel();
        },
        carousel: function() {
            var owl;

            owl = $('.testimonial_slider').owlCarousel({
                items      : 1,
                dots       : true,
                center     : true,
                autoplay   : true,
                nav        : false,
                loop       : true,
                margin     : 10,
            });
            $('.owl-next').on('click',function(){
                action = 'next';
            });
            $('.owl-prev').on('click',function(){
                action = 'prev';
            });
            $('.custom_owl_carousel').on('click', 'li', function(e) {
                owl.trigger('to.owl.carousel', [$(this).index(), 300]);
            });
        }
    };
    Owl.init();


});`

1 个答案:

答案 0 :(得分:0)

我解决了这个问题。谢谢。我删除了这行 dotsContainer:'.custom_owl_carousel',