title: JQuery - Select All CheckBoxes within current table only
body: <p>I have two nested repeaters in C#.  The outer has some grouping information and the inner has a table with X number of checkboxes.</p>
  
  <p>So I will have Y number of tables.  At the top of each table there will be a check box (as well as a checkbox on each row).  What I want to do is be able to select all check boxes in a single table from the checkbox at the top of each table.</p>
  
  <p>I can select ALL checkboxes in one go as follows:</p>
  
  <pre><code>$(document).ready(function() {
          $("#checkboxflipflop").click(function() {
              var checked_status = this.checked;
              $(".storecheckbox input").each(function() {
                  this.checked = checked_status;
              });
          });
      });
  </code></pre>
  
  <p>I just can't figure out how to narrow the selection to the current table, (the checkbox at the top of each table is in the th row).</p>
  
  <p>Thanks</p>
  
  <p>EDIT.... sorry forgot to mention that we are on 1.26 of JQuery and not sure if I am allowed to move us up at all.  Which means "closest" is not there.</p>