jquery prev() doesn't work
<p>I have this html code:</p>

<pre><code>&lt;body&gt;
&lt;div class="CodeRay"&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span class="no"&gt;   1&lt;/span&gt; require &lt;span class="s"&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="k"&gt;yaml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="no"&gt;   2&lt;/span&gt; require &lt;span class="s"&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;span class="no"&gt;   3&lt;/span&gt; 
&lt;span class="no"&gt;   4&lt;/span&gt; &lt;span class="r"&gt;module&lt;/span&gt; &lt;span class="cl"&gt;ActiveRecord&lt;/span&gt; &lt;span class="c"&gt;#:nodoc:&lt;/span&gt;
&lt;span class="no"&gt;   5&lt;/span&gt;   &lt;span class="c"&gt;# Generic Active Record exception class.&lt;/span&gt;
&lt;span class="no"&gt;   6&lt;/span&gt;   &lt;span class="r"&gt;class&lt;/span&gt; &lt;span class="cl"&gt;ActiveRecordError&lt;/span&gt; &amp;lt; &lt;span class="co"&gt;StandardError&lt;/span&gt;
&lt;span class="no"&gt;   7&lt;/span&gt;   &lt;span class="r"&gt;end&lt;/span&gt;
&lt;span class="no"&gt;   8&lt;/span&gt;
...
&lt;/body&gt;
</code></pre>

<p>For this html code I have javascript:</p>

<pre><code>$(document).ready(function() {
  $('span').not('.no,.c,.r,.pc').click(function(e) {
    var target = $(e.target);
    var element = target.prev('.no');
    element.effect('highlight', {}, 'slow');
});
</code></pre>

<p>The problem is <code>prev()</code> returns the same object as before, can't find <code>.no</code> element. It doesn't searching through the predecessors of elements in DOM tree. Thanks</p>
