Owl Carousel select current item?

11,186

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.

Share:
11,186
PsyGnosis
Author by

PsyGnosis

Game Developer at Gamolt Game Studio

Updated on July 16, 2022

Comments

  • PsyGnosis
    PsyGnosis almost 2 years

    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.