Owl Carousel 2 beta , jump to a specific slide

It's a shame this wasn't documented anywhere :/

jumpTo doesn't appear to be working in owl carousel 2, however you can use to and pass in an array of params. The first param is the slide, the second param is animation speed. Sending a 0 tells it to not animate at all.

owl.trigger('to.owl.carousel', [3, 0]);


Try:

$('.btnJump').click(function(){
    $('#myCarousel').trigger('to.owl.carousel', 3)
  });

Documentation can be found here: https://owlcarousel2.github.io/OwlCarousel2/docs/api-events.html


For Owl Carousel 2.x.x I try this if you want to jump to item 0 with animation

$('#myowl').trigger('to.owl.carousel', [0,0,true])

Tags:

Owl Carousel