Streaming live at 10am (PST)

Javascript - need help!

I have this page:

In the section where there is a card next to the cell phone, I want to keep the status of the first card: “01. Take the assessment and create a free account” as selected, without the user having to mouse over or click to activate this effect.

I am having a hard time doing this in the webflow panel, so I would like to add a javascript event to change the appearance of this section (again as inactive - gray text) when another card is clicked.

I just want the appearance of the first card to be that of a selected card, as default, but when clicking on the others, I want the same fading-out effect.

Hi @Daniel_Gomes there should be two simple steps to make it work.

  1. you should add first element class that will differentiate it. This can be done with use of nth-child()

  2. create an Array from elements, add “click” eventListener() to each element that will check if class exist and remove this class form each element and add class on clicked element.