Using Owl Carousel

A carousel (American English: from French carrousel and Italian carosello), roundabout (British English), or merry-go-round, is a type of amusement ride consisting of a rotating circular platform with seats for riders. wiki

  1. Owl Carousel
    1. Owl Carousel https://owlcarousel2.github.io/OwlCarousel2/

  • html
      <div class="owl-carousel owl-theme">
        <div class="item"></div>
        <div class="item"></div>
      </div>
    
  • javascript
    var owl = $('.owl-carousel'); 
    owl.owlCarousel({
      margin: 10,
      nav: true,
      loop: true,
      responsive: {
        0: { items: 1 },
        600: { items: 3 },
        1000: { items: 5 }
      }
    });
    ...
    // update
    owl.trigger('destroy.owl.carousel'); 
    owl.find('.owl-stage-outer').children().unwrap();
    owl.removeClass("owl-center owl-loaded owl-text-select-on");
      
    owl.html(content);
    owl.owlCarousel();
    

© 2018. All rights reserved.

Powered by Hydejack v8.4.0