+ 8
[SOLVED] How to turn off a checkbox toggle button using other checkbox toggle button in Javascript ?
check this video you will get understood what I want đđđ https://drive.google.com/file/d/1N0hebHtg1Kn06K13tDLMEBYVf2DvlSHV/view?usp=drivesdk https://code.sololearn.com/WLzjA403DOPy/?ref=app I would be better if you solve problem with pure JavaScript
2 Answers
+ 3
first thing is that your html has errors, sort them out first.
Now, I've used the jQuery but the logic is still same
I've made the changes, so if you want, you can copy them but focus on learning, as well as syntax.
https://code.sololearn.com/WP5PGtNi8u6d
The logic behind to make it work is that you create functions which are executed on clicking on checkbox.
when you click on checkbox 1, if checkbox 2 and 3 are checked then uncheck 2 otherwise do nothing
when you click on checkbox 2, if checkbox 1 and 3 are checked then uncheck 3 otherwise do nothing
when you click on checkbox 3, if checkbox 2 and 1 are checked then uncheck 1 otherwise do nothing
0
6305428171