PsyGnosis
PsyGnosis

Reputation: 1499

Owl Carousel select current item?

I want to select Owl Carousel 2 current item. How am I gonna do that? Please Help!

There is two center classed item in carousel i'have tried this

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

but it not works correctly.

Upvotes: 3

Views: 11860

Answers (1)

Jayson Cheng
Jayson Cheng

Reputation: 151

I'm basing this answer on the demo on the Owl Carousel 2 homepage. To get the active items, do this:

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

where .owl-carousel is the carousel container and .owl-item is the item class.

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

Upvotes: 4

Related Questions