add-class-to-the-first-and-last-item-among-the-visible-items-of-Owl-Carousel-2
Owl carousel adds a class active to all the visible items. So as you can see I have written a script below to loop through all the owl-item with class active and then using the 0th and last index, I am adding two different classes. Use the code in your project and you will get the classes added.