How to find first element without transversing using jQuery?
<p>I have a set of buttons that, when clicked, should select the first text box after the button and insert the date.  My issue is that since my form is dynamically generated, hard coded transversing  won't work (i.e. the text box isn't always immediately after the button, there may be other elements inbetween).  I have tried using <code>find()</code>, but that doesn't seem to be working.  Any ideas?</p>

<pre><code>$('.required').on('click',function(){

        ...

        $(this).find(".timestamp").first().val(dateStr);

        ...

});
</code></pre>

<p><strong>EDIT:</strong></p>

<pre><code>$(this).parent().parent().siblings().find(".timestamp").first().val(dateStr); 
</code></pre>

<p>A bit closer, but the above always populates the value for the first textbox on the page. I've tried using closest() instead of first(), but that doesn't seem to work either. Any ideas?</p>
