A
A
AlexRas2015-09-22 15:03:01
JavaScript
AlexRas, 2015-09-22 15:03:01

Insert multiple owlcarousel if number not known?

You need to insert several owlcarousels on the page and make them independent.
Here is an example connection code:
$('.owl-carousel').owlCarousel();
There can be from 0 to 20 carousels per page.
I see a solution using jqueru .each(), but I don't know how correct it is?

$(".owl-carousel").each(function() {
     $(this).owlCarousel();
});

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew, 2015-09-22
@AlexRas

codepen.io/anon/pen/Bozvpy

A
Andrey Brekotkin, 2017-05-11
@brekot

Yes that's right.
Two or more carousels (Owl Carousel) on the page can be connected as described here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question