title: JQuery UI datepicker not working when bound to a class
body: <p>I've got this code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;link type="text/css" href="css/blitzer/jquery-ui-1.7.2.custom.css" rel="stylesheet" /&gt;   
    &lt;script type="text/javascript" src="js/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
  $(function() {
    $('.hasDatepicker').datepicker();
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;date: &lt;input type="text" name="data" class="hasDatepicker" /&gt;&lt;/p&gt;
  &lt;input type="submit" value="send" /&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I click the input field, nothing happens. The datepicker is initialized though, when I inspect the DOM in Firebug, I get the <code>id="dp1260260566059"</code> added to my <code>&lt;input&gt;</code> element.</p>
  
  <p>After changing the <code>html</code> and <code>js</code> to use <code>id</code> attribute instead of <code>class</code>, so having this in my code:</p>
  
  <pre><code>$(function() {
    $('#hasDatepicker').datepicker();
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;p&gt;date: &lt;input type="text" name="data" id="hasDatepicker" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Everything works OK. </p>
  
  <p>Can't datepicker from JQuery UI work for all elements of some class? </p>