@TH3RIV
Posted
Hi, @stagnant-sys!
There's no need to use JS for highlighting a selected option. You can use radio buttons instead of divs with the same name so only one can be selected at a time.
Then with CSS you hide them and style the labels, so whenever you select a label it selects the button and if you pick a different one, it deselects it.
JavaScript is only needed to switch between Select and Thanks screens (eventListener
) and to show the selected value (for
loop).
You can look at my solution for a better idea on what I mean.
Hope this helps!
Marked as helpful
@thomaspaysac
Posted
@TH3RIV Thanks a lot I'll have to look into that, I studied CSS in-depth but it seems I lack some basic HTML knowledge.