Owl Carousel choose the current item?

I want to select the current Owl Carousel 2. How do I do this? Please, help!

There are two classified objects in carousels I tried this

$.each(centerItems, function () {
    if (!$(this).hasClass('cloned')) {
        centerItem = $(this);
    }
});

      

but it doesn't work properly.

+3


source to share


1 answer


I base this answer on the demo on the Owl Carousel 2 page . To get active items, do the following:

$('.owl-carousel .owl-item.active')

      



where .owl-carousel

is the carousel container and .owl-item

is the item class.

If that doesn't work, please post your HTML code.

+2


source







All Articles