mardi 14 août 2018

HTML (or jQuery): Select either one or both checkboxes (or radio buttons)

I have two checkboxes in HTML which are both selected by default. Users can de-select them.

Now, I would like to have at least one of the two checkboxes checked constantly. That is, users can either have both of them checked, or only one of them, but they should not be able to de-select both.

(Background information: They are connected to a hide/show-jQuery-toggle, and deselecting both would make the whole page empty.)

Do you know how to do this (with either checkboxes or radio buttons - or something else)? I would be grateful for your help!




Aucun commentaire:

Enregistrer un commentaire