uncheck all checkboxes except the one with a class?
- by Dejan.S
hi i try to check/uncheck all checkboxes that don't got a class to them. This is the code I got but it check the class boxes to.
$(document).ready(function() {
$('#ctl00_ContentPlaceHolder1_repReceivers_ctl00_chxAll').click(
function() {
if (!$("input[type='checkbox']").hasClass("testclass")) {
$("input[type='checkbox']").attr('checked', $('#ctl00_ContentPlaceHolder1_repReceivers_ctl00_chxAll').is(':checked'));
}});
});
any ideas where I go wrong?