title: display datepicker on dynamically created button
body: <p>i'm trying to show datepicker when user click on dynamically created button.i don't want to show text box there so i use hidden input.</p>
  
  <p>Javascript:</p>
  
  <pre><code>        function showDate(){
          var dateDiv = $('#dateDiv');
          for(ind=0; ind&lt;=5; ind++){
              var date = $('&lt;img src="calendar.png" class="datepicker" id="'+ind+'-date" /&gt;&lt;input type="hidden" id="'+ind+'-date-picker" /&gt;&lt;br /&gt;');
              dateDiv.append(date);
          }
      }
  
      window.onload = function(){
          showDate();
          $('.datepicker').live('click', function(){
              var datepickerId =$(this).attr('id');
              datepickerId += '-picker';
              $('#'+datepickerId).datepicker();
          });
      }
  </code></pre>
  
  <p>but nothing happen when i click on calender icon.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
     &lt;div id="dateDiv"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>