Simple, JQuery select all check box
Seriously, this is a snippet that should be out there, jeez:
function selectAllChecks(){
if( $(this).attr('checked') == true ){
$(':checkbox:not(this)').attr('checked', true);
}
else{
$(':checkbox:not(this)').attr('checked', false);
}
}
$(document).ready(function(){
$(’input#selectAll’).bind(”click”,selectAllChecks);
}); //end document.ready function
Obviously, you want your select all checkbox to have an id of “selectAll”












Leave a comment