html5 recipe - sinsunsan/archiref_wiki GitHub Wiki

Make a checkox react when checking on another element

The for attribute link the label element to the input element. So it suffice to click on one of these two element to make the checkbox "checked"

<div class="option checkbox">
   <input id="course-type1" name="main-choice">
   <label for="course-type1">
       <span class="text-label">Entrée</span>
   </label>
   <input id="course-type2" name="main-choice">
   <label for="course-type2">
       <span class="text-label">Entrée</span>
   </label>
</div>
⚠️ **GitHub.com Fallback** ⚠️