all checkbox selected


$(function(){

$(“#selectall”).click(function(){
alert(“hell”);
$(.case).attr(“checked”,.this.checked);
});
// add multiple select / deselect functionality
/* $(“#selectall”).click(function () {
$(‘.case’).attr(‘checked’, this.checked);
});
*/
// if all checkbox are selected, check the selectall checkbox
// and viceversa
$(“.case”).click(function(){

if($(“.case”).length == $(“.case:checked”).length) {
$(“#selectall”).attr(“checked”, “checked”);
} else {
$(“#selectall”).removeAttr(“checked”);
}

});
});

Multiple Checkbox Select/Deselect – DEMO

Multiple Checkbox Select/Deselect – DEMO

Cell phone Rating
BlackBerry Bold 9650 2/5
Samsung Galaxy 3.5/5
Droid X 4.5/5
HTC Desire 3/5
Apple iPhone 4 5/5