Working Ninja
2018-05-03T17:26:20
JavaScript Toggle Checked

Toggle all <option>'s as checked/unchecked with the click of a <button>.

<select>
    <option></option>
    <option></option>
    <option></option>
</select>

<button></button>
jQuery("button").click(function(){
    jQuery("select :checkbox").each(function(){
        this.checked = !this.checked;
    });
});

Source: https://stackoverflow.com/questions/4177159/toggle-checkboxes-on-off