title: in javascript, is there such an event as onCreate?
body: <p>I'm working with an existing system set up by someone else (no longer here).  In this system, clicking on the text within a special <code>&lt;span&gt;</code> will trigger a js function which will replace the text with an <code>&lt;input&gt;</code> field.  The text which was there is assigned as the <code>value</code> of the <code>&lt;input&gt;</code> element.</p>
  
  <p>An <code>onblur</code> event is assigned to this new <code>&lt;input&gt;</code> field.  This calls a function which updates the data in the database via an AJAX call.  As part of this action, the <code>&lt;input&gt;</code> field is replaced with the new value (same <code>&lt;span&gt;</code> contents), and the onclick event is re-assigned.  In this way, you can click on the text, change it, click elsewhere, and it is automatically updated in the database.  Then you can do it again as it sets up the original events dynamically with each update.</p>
  
  <p>It is in-between the first event and the second that I want access to that <code>&lt;input&gt;</code> field.  I want to add a jquery <code>.datepicker()</code> to it.</p>
  
  <p>How would I go about calling <code>.datepicker()</code> on a dynamically-created element?</p>