D
D
DeniSidorenko2018-10-20 11:32:36
Owl Carousel
DeniSidorenko, 2018-10-20 11:32:36

How to change OWl slide by index?

Hello, I made custom thumbnails. Index thumbnail = index slide.

$('.modal-thumbnails img').on('click',function(){
    var indexThumb = $(this).index()
     // КОД ЧТО бы при клике, owl сменился на нужный слайд,
  })

OWL code itself
var modal = $('.modal-slides');
  modal.owlCarousel({
    items: 1,
  });


  $('.modal-thumbnails img').on('click',function(){
    var indexThumb = $(this).index()
    console.log(indexThumb)
  })

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-10-20
@DeniSidorenko

modal.trigger('to.owl.carousel', [ indexThumb, 100, true ])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question