title: jquery: check all/none checkbox only works once
body: <p>I am making a check all/none checkbox. However, it only works once: it can check all, then uncheck all, but then cannot check them all again.</p>
  
  <p><a href="http://jsfiddle.net/SDEwB/" rel="nofollow">http://jsfiddle.net/SDEwB/</a></p>
  
  <pre><code>check all/none: &lt;input type = "checkbox" id = "check_all_none"&gt;&lt;/input&gt;
  &lt;br/&gt;
  &lt;input type = "checkbox" class = "others"&gt;&lt;/input&gt;&lt;br/&gt;
  &lt;input type = "checkbox" class = "others"&gt;&lt;/input&gt;
  
  
  $('#check_all_none').change(function () {
      if ( $(this).is(':checked') ){
          $('.others').attr("checked", true);
      }
      else{
          $('.others').removeAttr("checked"); 
         // $('.others').attr("checked", false); // tried this, too
      }
  });
  </code></pre>