jeudi 14 décembre 2017

Master Checkbox to select multiple check boxes

Hi want have a game in which settings are controlled by checkbox and I want like a master Checkbox which ticks other check boxes.

Here are the check boxes:

<small>
                <label>
                  <input type="checkbox" class="save" data-box-action="skins" onchange="setSkins(!$(this).is(':checked'));" data-box-id="0x1"> No skins</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="names" onchange="setNames(!$(this).is(':checked'));" data-box-id="0x2"> No names</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="theme" onchange="setDarkTheme(!$(this).is(':checked'));" data-box-id="0x3"> Light Theme</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="colors" onchange="setColors($(this).is(':checked'));" data-box-id="0x4"> No colors</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="mass" onchange="setShowMass(!$(this).is(':checked'));" data-box-id="0x5"> Hide mass</label>
              </small>
              </div>
              <div class="col-xs-6">
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="grid" onchange="setGrid($(this).is(':checked'));" data-box-id="0x7"> Show Grid</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="trans" onchange="setTrans($(this).is(':checked'));" data-box-id="0x8"> Trans Cells</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="viruses" onchange="setViruses($(this).is(':checked'));" data-box-id="0x9"> Simple Viruses</label>
              </small>
                <small>
                <label>
                    <input type="checkbox" class="save" data-box-action="cell" onchange="setCell($(this).is(':checked'));" data-box-id="0x12"> Cell Bord.</label>
              </small>
                <small>
                <label>
                  <input type="checkbox" class="save" data-box-action="chat" onchange="setChatHide($(this).is(':checked'));" data-box-id="0x6"> Hide Chat</label>
              </small>

I want 2 Master Checkbox 1 Named Anti-Lag and other as Anti-Lag ++

For Anti-lag I want these following checked,

No Skins
No Names
Hide Mass
Trans Cells
Simple Viruses

For Anti-Lag++

No Skins
No Names
Hide Mass
Trans Cells
Simple Viruses
No Colors
Hide Chat

Thank You!




Aucun commentaire:

Enregistrer un commentaire