+ 3

How to get the reset button work so that when I click on a button, the others get reset?

https://code.sololearn.com/WYe825XtQ75Q/?ref=app

26th Jan 2022, 8:00 PM
Tech
4 odpowiedzi
+ 1
https://code.sololearn.com/WfHxQZvbdtBA/?ref=app I also make radio do its job, in your code you can select all of tham, exept only one. You set some complex style for this radio element (better to say labels, radio is hidden) so i was lazzy to make it reset background color to default also, you will need to access to exact element and change style, or completly change way of styling. I will for example use button or just div, not input for this kind of app
26th Jan 2022, 9:38 PM
PanicS
PanicS - avatar
+ 1
Revma thank you🙏🏽
27th Jan 2022, 3:28 AM
Tech
+ 1
PanicS Thank you🙏🏽 Actually I didn't want to make it with js when i was styling it I wanted to use css like so Input[type="radio"][id="blue"]:checked~.red,input[type="radio"][id="red"]... But it didn't work So I tried to finally make it with js
27th Jan 2022, 3:42 AM
Tech