Question:
How do I assign a CSS custom class within a hover event?
Product:
Wix Studio
What are you trying to achieve:
I am trying to change the z-index of an element on hover, so I have created a custom CSS property and would like to assign it to an element on hover.
If there is a better way to achieve this then I am open to it.
Create a custom class via the code panel and add a custom css hover selector
Example
I created a custom class via the code panel and added a custom selector that increases the z-index of any element with the custom class “sentToFront” to 10.
I’m pretty sure you would have to use velo. Make the class you want to give it, then assign it using onClick() and replace() so you switch the old class to a new one.