javascript - Owl Carousel select current item? - Stack Overflow

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

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.

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.

Share Improve this question edited Aug 28, 2016 at 12:19 martin 97.1k26 gold badges204 silver badges235 bronze badges asked Nov 18, 2014 at 8:28 PsyGnosisPsyGnosis 1,4996 gold badges21 silver badges28 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744309871a4567895.html

相关推荐

  • javascript - Owl Carousel select current item? - Stack Overflow

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

    7天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信