title: jQuery - toggle select all checkboxes
body: <p>Fought with a bunch of examples and, being still new to jQuery/Javascript, cannot get my code to function (here my my template in gsp):</p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
      &lt;tr&gt;
         &lt;th&gt;&lt;input type="checkbox" name="selectAll" onclick="selectAll(this.checked);"/&gt;&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
           &lt;td&gt;
              &lt;td&gt;&lt;input type="checkbox" name="domainList" value="${domainInstance.id}"/&gt;&lt;/td&gt;
      &lt;/tbody&gt;
  &lt;table&gt;
  </code></pre>
  
  <p>I have the following javascript snippet in my main gsp, that calls the template:</p>
  
  <pre><code>function selectAll(status) {
  
  }
  </code></pre>
  
  <p>How do I select all checkboxes from the selectAll name?</p>