uncheck all checkboxes except the one with a class?
<p>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.</p>

<pre><code>$(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'));
         }});
    });
</code></pre>

<p>any ideas where I go wrong?</p>

<p><strong>EDIT</strong><br />
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.</p>

<p><strong>EDIT CODE</strong><br /></p>

<pre><code>&lt;span class="testclass"&gt;&lt;input id="ctl00_ContentPlaceHolder1_chxMale" type="checkbox" name="ctl00$ContentPlaceHolder1$chxMale" /&gt;&lt;/span&gt;
</code></pre>
