Home > Back-end >  Owl-carousel not showing anything. Console showing some error
Owl-carousel not showing anything. Console showing some error

Time:07-28

full-code-1

full-code-2

I want this carousel for Django.. I tried to download files and link but both CDN method and offline files are showing same result.. please help me to fix this issue.. I just want a owl-carousel..

CodePudding user response:

Your js order linking is wrong

File order should be like below because owl carousel library reads methods from jquery file and owlCarousel methods reads it's own library

         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
    <script>
    $('.owl-carousel').owlCarousel({
        loop:true,
        margin:10,
        nav:true,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:3
            },
            1000:{
                items:5
            }
        }
    })

</script>
  • Related