title: birthday picker in JQuery
body: <p>I write this code for birthday picker in java script, but it is not
  displaying the options in drop-down list. How can I show them.The output of this code is 3 drop-down lists with no options in them. I want to make a complete birthday picker with accurate number of days, and 29 days for the month of February in a leap year. I will be very thankful to all of you.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function () {
  
          for (i = new Date().getFullYear() ; i &gt; 1900; i--) {
              $('#years').append($('&lt;option /&gt;').val(i).html(i));
          }
  
          for (i = 1; i &lt; 13; i++) {
              $('#months').append($('&lt;option /&gt;').val(i).html(i));
          }
          updateNumberOfDays();
  
          $('#years, #months').change(function () {
  
              updateNumberOfDays();
  
          });
  
      });
  
      function updateNumberOfDays() {
          $('#days').html('');
          month = $('#months').val();
          year = $('#years').val();
          days = daysInMonth(month, year);
  
          for (i = 1; i &lt; days + 1 ; i++) {
              $('#days').append($('&lt;option /&gt;').val(i).html(i));
          }
  
      }
  
      function daysInMonth(month, year) {
          return new Date(year, month, 0).getDate();
      }
  &lt;/script&gt;
  &lt;body&gt;
  &lt;h1&gt;
      Birthday
  &lt;/h1&gt;
  &lt;select id="days"&gt;&lt;/select&gt;
  &lt;select id="months"&gt;&lt;/select&gt;
  &lt;select id="years"&gt;&lt;/select&gt;
  &lt;/body&gt;
  </code></pre>