O
O
olya_0972020-07-27 11:44:28
JavaScript
olya_097, 2020-07-27 11:44:28

How to change slides by clicking on the image?

i.e. in the .block__holder wrapper
https://jsfiddle.net/n8jv4b5m/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-07-27
@olya_097

$('.block__holder').on('click', '.block__image', function() {
  const $this = $(this);
  $this.addClass('block__image--active').siblings().removeClass('block__image--active');
  block_slider.trigger('to.owl.carousel', $this.index());
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question