toggling table rows but every tables rows are effected from one id
<p>I am toggling table rows at the moment, however only the first entry is clickable and when that is clicked every single row in all of my tables are hidden.. </p>

<p>I would like some help in figuring out how to make it so that when the text of each table is clicked only that tables rows are effected. not every tables in the loop.</p>

<p>this is what my code looks like</p>

<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
    &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
    &lt;xsl:template match="/Catalogue"&gt;
     &lt;html&gt;
     &lt;header&gt;
        &lt;script type ="text/javascript" src="jquery.js" &gt;&lt;/script&gt;
        &lt;script&gt;
            $(function() {
            $('#toggle').click(function() {
            $('td:nth-last-child(-n + 1):nth-child(3n + 1)').toggle();                
       });
    });
    &lt;/script&gt;


    &lt;/header&gt;
     &lt;body&gt;
        &lt;xsl:for-each select="Talents"&gt;
        &lt;xsl:if test="Talent != ''"&gt;
            &lt;table border="0" width="550"&gt;
                &lt;tr&gt;
                    &lt;td bgcolor="#A0A0A0" width="80%"&gt;

                    &lt;b id="toggle"&gt;&lt;xsl:value-of select="Talent"/&gt;&lt;/b&gt;&lt;/td&gt;

                    &lt;td bgcolor="#A0A0A0" width="20%" align="center"&gt;&lt;xsl:value-of select="Cost"/&gt;
                    &lt;xsl:text&gt;  -  &lt;/xsl:text&gt;
                    &lt;xsl:value-of select="Type"/&gt;&lt;/td&gt;
                 &lt;/tr&gt;

                &lt;xsl:if test="Prerequisite != ''"&gt;
                &lt;tr&gt;
                    &lt;td colspan="2" bgcolor="#C0C0C0"&gt;&lt;xsl:value-of select="Prerequisite"/&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/xsl:if&gt;   

                &lt;xsl:if test="Action != ''"&gt;
                &lt;tr id="rowToClick" style="display:none"&gt;
                    &lt;td colspan="2" bgcolor="#E0E0E0"&gt;&lt;xsl:value-of select="Action"/&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/xsl:if&gt;

                &lt;xsl:if test="Description != ''"&gt;
                &lt;tr&gt;
                    &lt;td colspan="2" bgcolor="#EBEBEB"&gt;&lt;xsl:value-of select="Description"/&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/xsl:if&gt;

            &lt;/table&gt;
        &lt;/xsl:if&gt;
     &lt;/xsl:for-each&gt;
     &lt;/body&gt;
     &lt;/html&gt;
    &lt;/xsl:template&gt;
    &lt;/xsl:stylesheet&gt;
</code></pre>

<p>any help would be greatly appreciated.</p>
