Jquery toggle not closing row when new one is opened
<p>I am having a problem when trying to get jquery to close an open row in a table while opening another.   I am trying to use toggle() to no avail and I know I am just missing something.   Here is my html:</p>

<pre><code>&lt;table class="ProcTable" rules="all" cellpadding="0" cellspacing="0"&gt;
   &lt;thead&gt;   
      &lt;tr class="proctablerow"&gt;
         &lt;th&gt;Recently Issued Procedures&lt;/th&gt;         
      &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Admin&lt;/td&gt;
         &lt;td&gt;User Name #1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #2&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #3&lt;/td&gt;
      &lt;/tr&gt; 
      &lt;/tbody&gt;    
&lt;/table&gt;
&lt;table class="ProcTable" rules="all" cellpadding="0" cellspacing="0"&gt;
   &lt;thead&gt;   
      &lt;tr class="proctablerow"&gt;
         &lt;th&gt;Recently Viewed Procedures&lt;/th&gt;         
      &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Admin&lt;/td&gt;
         &lt;td&gt;User Name #1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #2&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #3&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;      
      &lt;/table&gt;
      &lt;table class="ProcTable" rules="all" cellpadding="0" cellspacing="0"&gt;
   &lt;thead&gt;   
      &lt;tr class="proctablerow"&gt;
         &lt;th&gt;Bookmarked Procedures&lt;/th&gt;         
      &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Admin&lt;/td&gt;
         &lt;td&gt;User Name #1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #2&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;/td&gt;
         &lt;td&gt;Reader&lt;/td&gt;
         &lt;td&gt;User Name #3&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;      
      &lt;/table&gt;

      &lt;/table&gt;
</code></pre>

<p>Here is my jquery code:</p>

<pre><code>$(document).ready(function() {    
    $("#accordion").accordion( { active: false, collapsible: true });
    $(".ProcTable").accordion( { active: false, collapsible: true, autoHeight: false });  

    $('table.ProcTable tr.proctablerow th') .click(
    function() {
        $(this) .parents('table.ProcTable') .children('tbody') .toggle();
    });

});
</code></pre>

<p>Can someone help me figure out how to close one row while opening another row (accordion style).  Thanks!</p>
