title: Apply jQuery datepicker to multiple instances
body: <p>I've got a jQuery date picker control that works fine for once instance, but I'm not sure how to get it to work for multiple instances.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
          $('#my_date').datepicker();
      });
  &lt;/script&gt;
  
  &lt;% Using Html.BeginForm()%&gt;
  &lt;% For Each item In Model.MyRecords%&gt;
  &lt;%=Html.TextBox("my_date")%&gt; &lt;br/&gt;
  &lt;% Next%&gt;
  &lt;% End Using%&gt;
  </code></pre>
  
  <p>Without the For Each loop, it works fine, but if there's more than one item in the "MyRecords" collection, then only the first text box gets a date picker (which makes sense since it's tied to the ID). I tried assigning a class to the text box and specifying:</p>
  
  <pre><code>$('.my_class').datepicker();
  </code></pre>
  
  <p>but while that shows a date picker everywhere, they all update the first text box.</p>
  
  <p>What is the right way to make this work?</p>