title: Disable all unchecked checkboxes of a class in jquery
body: <p>I want to disable all unchecked checkboxes of a class when one of the checkboxes in that class is checked so i tried this</p>
  
  <pre><code>if ((($('input[type=checkbox]:checked.classname)).length)==1) {
  
      $('.classname').not(':checked').each(function(){
                          $(this).attr('disabled','disabled');
                          });
  </code></pre>
  
  <p>and i also tried this one</p>
  
  <pre><code>    $("input[type=checkbox]."+aclass).not(':checked').attr('disabled',true);
  </code></pre>
  
  <p>This code doesnt disable any of the checkboxes although i am getting the length right using this selector?</p>