How to make check all and uncheck all with jquery
HTML
<input type="checkbox" id="checkAll">Select All
<input type="checkbox" class="candidates">Ola
<input type="checkbox" class="candidates">Brainwave
<input type="checkbox" class="candidates">Mubarak
<input type="checkbox" class="candidates">Atom Bear
JS
$("#checkAll").click(function(){
$('.candidates').not(this).prop('checked', this.checked);
});