title: select all checkbox in header , to select all checkboxes in that column
body: <p>I have used the code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(window).load(function () {
      $(document).delegate(".checkall", "click", function(event) {
        $(this).closest("table").find(':checkbox').attr('checked', this.checked);
      });
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>This code is working fine when I select/deselect the checkbox in header for the first time. But when I again select the checkbox then this code is not working. The checkboxes are not selected. </p>