OnClick change all sibling table rows jQuery
<p>I am try to write a jQuery statement to change the table row that is currently clicked to a different foreground color while making all the sibling table rows the same color. Basically making it look like the clicked row is active. Here's what I have so far, this here works the first time, but on the second time on it never sets all the siblings to the non selected color.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function changeRows(currentRow) {
        $(currentRow).css('color', 'green'); // change clicked row to active color
        $(currentRow).parent().siblings().css('color', 'red'); // change all the rest to non active color
    }
&lt;/script&gt;  


&lt;table&gt;
  &lt;tr&gt;
    &lt;td onclick="changeRows(this)"&gt;123
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td onclick="changeRows(this)"&gt;1234
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td onclick="changeRows(this)"&gt;12345
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td onclick="changeRows(this)"&gt;123456
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
</code></pre>
