How can I find the parent tr of a td using jQuery?
<p>I have the following:</p>

<pre><code>    tdToPad = tds.filter('[id^="input_Title_"]')
    pad = 60;
    tdToPad.css('margin-left', pad);
</code></pre>

<p>What I would like to do is to remove any class that starts with "X-" and give the row that is contained by "tdToPad" a class of "X-" + pad. </p>

<p>Something like:</p>

<pre><code>&lt;tr class='X-60'&gt;
   &lt;td&gt;
   &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Being that toToPad refers to the td element in a row. How can I give the parent tr the class "X-" + pad ? I think I need something like the following but if that's the correct way to do it then how can I remove elements already there with a class of "X-" somevalue and then give this element the correct class?</p>

<pre><code>tdToPad.Parent('tr')
</code></pre>
