$('.tHospitalOK').click(function () { $(".tHospital").each(function () { if (this.checked == true) { this.checked = false; } else { this.checked = true; } }) })