nup
nup

Reputation: 368

Event to.owl.carousel and items > 1

Why does event to.owl.carousel work incorrectly with items > 1? When I try to switch to slide 1, it scrolls through 2 slides in a row instead.

https://codepen.io/photosho/pen/abqKJbw

Upvotes: 0

Views: 198

Answers (1)

Miheo
Miheo

Reputation: 515

Following this issue, they address that the to.owl.carousel will take 3 params [position, speed, offset].

https://github.com/OwlCarousel2/OwlCarousel2/issues/421

Please try the below code:

$('.button').on('click', function() {
    $('.owl-carousel').trigger('to.owl.carousel', [$('input').val(), 100, 1]);
  });

Upvotes: 1

Related Questions