Traverse HTML snippet from a click to get the contents of a span
<p>I have the following HTML (that is repeated many times) and want to get the contents of the span immediately before the href that I click.</p>

<pre><code>&lt;p class="listitem"&gt;
  &lt;img src="./1.jpg" alt="" width="50" height="50"/&gt;
  &lt;span class="votecount"&gt;22&lt;/span&gt; Votes
  &lt;span class="name"&gt;Richard Wilde&lt;/span&gt;
  &lt;a href="ViewEntry.aspx?Id=1019"&gt;View Entry&lt;/a&gt;
  &lt;div id="id-1"&gt;&lt;a href="#" rel="vote-1019" &gt;...&lt;/a&gt;&lt;/div&gt;
&lt;/p&gt;
</code></pre>

<p>I also have the following jquery, I am trying to populate count with 22 but can't seem to figure this one out.</p>

<pre><code>$("a[rel^='vote']").click(function () {
  var id = ($(this).attr("rel")).replace("vote-", "");
  $(this).unbind("click");
  var count= $(this).parent("div").parent(".listitem").children(".votecount");
  return false;
}); 
</code></pre>

<p><em>edit</em> sorry, even I add .text() on end I get NULL, I think the traversing is not quite right.</p>
