title: jQuery .each problem
body: <p>Brain squeeze and need help,</p>
  
  <p>I have a table with 6 rows that are that can be hidden or visible depending on if a check box is checked. This .each routine works great with one small problem - when the last check box (val="5") is checked and you hit the refresh button the row 6 (with class="hide5") is hidden. This only occurs on the last check box - any other checkbox that is checked stays visible.</p>
  
  <pre><code>$(document).ready(function($) {
      $('input:checkbox').each(
          function(rowIndex){
              if($('#view'+rowIndex).is(':checked') == true){
                  $('.hide'+rowIndex).show();
              }
              else if($('#view'+rowIndex).is(':checked') == false){
                  $('.hide'+rowIndex).hide();
              }
          }
      );
      $('input:checkbox').click(function () {                             
          var row = this.value;
          $('.hide' + row).toggle();
      });
  }); 
  </code></pre>
  
  <p>The HTML source for the 6<sup>th</sup> row is:</p>
  
  <pre><code>&lt;tr class="hide5"&gt;
    &lt;td width="175" align="center" style="padding:1px 0px 11px 0px"&gt;&lt;br /&gt;
      &lt;span&gt;Total&lt;/span&gt;&lt;br /&gt;
      &lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
    &lt;/td&gt;
    &lt;td width="175" align="center"&gt;
      &lt;input class="auto" type="text" id="bwPound" size="18" alt="p8c3pvS" /&gt;
    &lt;/td&gt;
    &lt;td width="175" align="center"&gt;
      &lt;input class="auto" type="text" id="bwPound" size="18" alt="p8c3pvS" /&gt;
    &lt;/td&gt;
  &lt;/tr&gt; 
  </code></pre>
  
  <p>Thanks in advance for your help</p>
  
  <p>Bob Knothe</p>