creating span IDs on the fly for later use in jquery
<p>I have some PHP code which runs a loop, spitting out a button and a span, each time it loops, like this:</p>

<p>(inside loop)</p>

<pre><code>echo "&lt;span id=\"sendbutton\"&gt; &lt;input type=\"button\" event='$eventID' id=\"sendsomeone\" value=\"Send a family member\"/&gt; &lt;/span&gt;";
echo "&lt;span id=\"nameshere\"&gt;&lt;/span&gt;";
</code></pre>

<p>Later in my code, I have jquery that catches one of the button clicks, and does code, then writes back.  What I want it to do is to write back to the span immediately following the button that was clicked.</p>

<pre><code>$('#nameshere').append('Hey! this was the button that you clicked!'); 
</code></pre>

<p>Clearly,  in my example, it does not quite work the way I want.  Each loop creates a span with an id of nameshere, and so when I click any of the buttons, it appends to the topmost span.  I could easily use <code>$eventID</code> as the span ID, but I don't know how to accurately reference it in my javascript.</p>

<p>How can I have it append to the button that was clicked?  <code>$(this)</code> perhaps?  I just don't know how to use it correctly.</p>

<p>Edit, more info:</p>

<p>My click code looks like this:</p>

<pre><code>$('input:button').click(function() {...}
</code></pre>

<p>Even more info:</p>

<p><strong>I should have asked more clearly.  I can make my span ID unique.  I just set it to be $eventID.  Done.   But how do I call that from in jquery?</strong></p>
