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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s