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 badges1 Answer
Reset to default 4I'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
评论列表(0条)