i am using owl carousel 2, where i am using the center function. I have 5 items to be displayed on the carousel. Is it possible using jquery to add classes to find certain divs within the carousel, without having to add ids or classes on the div. http://owlcarousel.owlgraphic.com/demos/center.html
heres my html
<div class="owl-carousel">
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
<div class="product"> Your Content </div>
</div>
heres my js
$(document).ready(function () {
$(".owl-carousel").owlCarousel({
center: true,
items:5,
loop:true,
margin:0,
responsive:{
600:{
items:5
}
},
nav:true
});
});
What i want if you were to view the actual carousel on live would be the addition of these two classes "a" and "b"
<div class="owl-carousel">
<div class="product"> Your Content </div>
<div class="product b"> Your Content </div>
<div class="product a"> Your Content </div>
<div class="product center"> Your Content </div>
<div class="product a"> Your Content </div>
<div class="product b"> Your Content </div>
<div class="product"> Your Content </div>
</div>
so i am basically trying to locate the divs next to center and the second div next to center