mardi 28 août 2018

JS always selected 1 of 2 checkboxes

I have 2 checkboxes in my page. First id is "status_1", second id is "status_2"

I want to make that both of them must be selected on page load and always keep one selected, when trying to deselect both.

So for example if "status_1" is selected, "status_2" is not selected and user is trying do deselect "status_1" too, "status_2" select automatically.




Aucun commentaire:

Enregistrer un commentaire