title: Getting jQuery datepicker live, when html is loaded from ajax
body: <p>I have the following jQuery script defined on all my forms.</p>
  
  <pre><code>$( "input:text.datepicker" ).datepicker({ 
      yearRange: "1900:+0",
      changeMonth: true,
      changeYear: true
  });
  </code></pre>
  
  <p>Basically this invokes the date picker on any input element that is of type text and has the class "datepicker".</p>
  
  <p>This works fine on all pages, except in one situation which I describe below.</p>
  
  <p>I have to load a form by ajax, which is then displayed in a jQueryUI Dialog. In this dialog I can only get the date picker to display <strong>if</strong> I include the java-script code again. Obviously I don't want to include the code twice. Is there a way to get the newly loaded textbox to display the date picker somehow?</p>
  
  <p>Thank you</p>