Question
I want to toggle an event if the 'active' class gets added to an element. How can I achieve this?
In my opinion it could be somehow achieved with a watcher method but I don't know how to watch if a classname applies on an element.
I'm using vue3.
Edit
I have a carousel, where you can slide through some divs and the visible gets the class 'active'. I want to watch all divs, and if they get active call a function.