Selecting nearest hidden input
<p>I have the following divs:</p>

<pre><code>     &lt;div class="vote"&gt;
     &lt;input type="hidden" name="reply-id" value="83743"&gt;
     &lt;a class="vote-up-0" title="Vote Up This Comment"&gt;up&lt;/a&gt;
     &lt;a class="vote-down-0" title="Vote Down This Comment"&gt;down&lt;/a&gt;
     &lt;/div&gt;


     &lt;div class="vote"&gt;
     &lt;input type="hidden" name="reply-id" class="reply-id" value="83745"&gt;
     &lt;a class="vote-up-0" title="Vote Up This Comment"&gt;up&lt;/a&gt;
     &lt;a class="vote-down-0" title="Vote Down This Comment"&gt;down&lt;/a&gt;
     &lt;/div&gt;
</code></pre>

<p>(Yes, it's a blatent(ish) copy of SO code, I'm trying to see how they do it).
So when a user clicks either vote up or vote down, it should find the hidden id.</p>

<p>This doesn't seem to work:</p>

<pre><code>       $('a.vote-up-0').click(function() {

           var id = $(this).closest('.reply-id').val();
</code></pre>
