T
T
Timur Nigmetov2016-06-22 13:53:40
JavaScript
Timur Nigmetov, 2016-06-22 13:53:40

How to assign an action only to this block?

Good day.
There is an owl carousel. All its blocks are implemented through id (#owl-clients)
$("#owl-clients").owlCarousel({

autoPlay: 3000, //Set AutoPlay to 3 seconds
navigation: false,
pagination: false,
items: 3,
itemsDesktop : [1199, 3],
itemsDesktopSmall: [979, 3]

});

I switched the carousel to classes, but when you click on back and forth, all the carousels on the page scroll through. How to implement this scheme without resorting to dividing carousels into separate classes, etc.? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Shabalin, 2016-06-22
@nikolayshabalin

var $carousels = $('.owl-carousel'); // класс ваших каруселек
$carousels.each(function() {
  $(this).owlCarousel({...})
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question