Get the current slide element on change event in OwlCarousel2

712 Views Asked by At

I am trying to create an effect similar to this (the demo uses Bootstrap Carousel):

https://codepen.io/SitePoint/pen/BpVrXP/

Bootstrap's 'slide.bs.carousel' returns a relatedTarget that is the slide element going to be displayed as soon as the carousel is moved i.e changed to another slide.

I haven't been able to find an equivalent data being returned in OwlCarousel2's changed.owl.carousel event. What event, if any, returns the element that's going to be in view?

Is there any alternative way or am I missing something?

1

There are 1 best solutions below

1
On

Try the event translated.owl.carousel, translated is fired after the animation