Good morning!
I'm using the owl-carousel plugin that has several items. I need to get the first and last items from the first page, but I can not.
The carousel renders like this:
<div class="owl-stage">
<div class="owl-item cloned">
</div>
<div class="owl-item cloned">
</div>
<div class="owl-item cloned">
</div>
<div class="owl-item active"> (quero pegar esse)
</div>
<div class="owl-item active">
</div>
<div class="owl-item active"> (quero pegar esse)
</div>
<div class="owl-item cloned">
</div>
<div class="owl-item cloned">
</div>
<div class="owl-item cloned">
</div>
</div>
The items on the first page are those that have the .active class. I tried some ways and it does not work:
.owl-stage .owl-item.active:first-child {
border:red;
}
.owl-stage .active:first-child {
border:red;
}
.owl-item.active:first-child {
border:red;
}
I can not use nth-child (n) because the amount of items varies a lot. So I need to do a way to always get the first and last .active, regardless of how many items it has.
Note: I'm sorry for the lack of accent, I'm using a vm and the keyboard is unconfigured ... :(