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?
EDIT
This suck but asp.net add a span around the checkbox input when given a cssclass, so the checkbox itself dont get the class. I tried to do like you say but like .not(thecheckboxid) but no luck.
EDIT CODE
<span class="testclass"><input id="ctl00_ContentPlaceHolder1_chxMale" type="checkbox" name="ctl00$ContentPlaceHolder1$chxMale" /></span>