Streaming live at 10am (PST)

Add event listener

Hey guys,
I’m trying to make a simple interaction using some custom javascript code.

So I have some buttons. What I want is to make the container of the buttons 50% transparent when none of the buttons are active.

For this, I made a webflow interaction of the buttons to change colors when clicked. On second click, they change the color back to normal.

I added an event listener to check if the color of the buttons changed. In case the color changed, I made the container 100% visible.

I think the logic is good but it doesn’t work so I need your help.

Here’s the project:
https://preview.webflow.com/preview/buttonsdemo?utm_medium=preview_link&utm_source=designer&utm_content=buttonsdemo&preview=da129bbd7160cd69c7bd16dc1b95d49b&mode=preview

Thank you,
Cristian