finding the closest previous sibling that contains .myClass
<p>I have a bunch of <code>&lt;tr&gt;</code> some of them contain a <code>&lt;td&gt;</code> that has <code>class="myClass"</code> but some don't. So it looks like something like this. </p>

<pre><code>&lt;tr&gt;
&lt;td class="myClass"&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>If I'm at a <code>&lt;tr&gt;</code>, how do I go up in rows until I hit the closest row that contains a <code>td.myClass</code>? Is there a clever way to do this? What I have now is a while loop that checks prev() and if it finds .myClass, it breaks. </p>
