How can I bind events to HTML generated after the page loads?
<p>I'm using jquery <code>.clone()</code> to add HTML to my page according to user clicks.</p>

<p>I'd like to add onclick handlers to the newly created HTML.   I know <a href="http://api.jquery.com/on/" rel="nofollow"><code>.on()</code></a> can be used to trigger events on future-created HTML, but I believe that must be written (and executed) <em>before</em> the HTML is created.</p>

<p>In this <a href="http://jsfiddle.net/thunderrabbit/Zxq2E/" rel="nofollow">example code</a>, if the user selects "related_id" from the select list, jquery creates a field where the user can enter ids.  I'd like to add an ajaxy thing here so the user can type the name of the related item instead of its id.  The ajax request will depend on which field the user selected.</p>

<p>Generally speaking, I know how to make ajax requests with jquery, but how do I add the field-specific ajax code to my freshly created HTML?</p>
