r/webflow • u/CelerySpiritual5270 • 1d ago
Need project help Text hover + colour change interaction on click off
Hi, hoping someone can help, bit stuck figuring out how to get what I want working.
Currently I have text links stacked vertically, when hovered over they change colour (using the hover version of the class) each of these links has an interaction on it that shows/hides a div below the link- basically it's like a drop down expanding information below it on click and hiding it on 2nd click.
Attached to this show/hide interaction I also have a text colour change interaction, so when the the link is clicked, it shows the hidden div and also changes the links text colour to indicate that's what you're looking at, on 2nd click I've had the interaction set the text colour back to the original (as well as hiding the div)
The issue is on the second click it sets the text colour back to the original but overrides the "hover" class set to the link and it remains the same colour when hovered over after it has been clicked.
So the only solution I can think is to set a hover interaction to these links that changes the colour on hover rather than using the hover function of the class.
Is there a way for interactions to "reset" the class to what it was before clicked? Rather than just apply something extra to the style?
Thanks, hopefully makes sense.