Jquery traversing using prev()
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5452917/jquery-prevselector-not-working">jQuery: prev(&lt;selector&gt;) not working?</a>  </p>
</blockquote>



<p>Consider this markup:</p>

<pre><code>&lt;tr class="store"&gt;
    &lt;td&gt;...&lt;/td&gt;
    &lt;td&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;td&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;...&lt;/td&gt;
    &lt;td&gt;...&lt;/td&gt;
    &lt;td&gt;&lt;a href="#" class="link"&gt;link&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Then this Jquery code:</p>

<pre><code>$('.link').live('click', function() {
    $(this).parents('tr').prev('.store').remove();
});
</code></pre>

<p>What I want to do is when I try to click <code>&lt;a href="#" class=".store"</code>, the previous <code>&lt;tr class="store"&gt;</code> should be removed. The Jquery code I posted doesn't work. Any thoughts?</p>
