jeudi 7 décembre 2017

Show/hide optgroup based on checkboxes

So basically I want a solution like in this question here but with the "master" being <checkbox> not <select>.
So for example I have four checkboxes and a select with four optgroups. I want to show only these optgroups which are selected with the checkboxes.
I am very new to javascript and can't think of a solution. I tried adapting the solution of the question I posted but without success. I also couldn't find the exact same problem on the internet.
Thanks for your help.




Aucun commentaire:

Enregistrer un commentaire