title: Why does .change event not work
body: <p>I want to get number of days in month using jQuery ajax, but .change event doesn't work. Do you have any idea why ?</p>
  
  <p>I've tried to call alert() function, but no response occured.</p>
  
  <p>index.html</p>
  
  <pre><code> &lt;script src="js/jquery.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
     $("#month").change(function() {
  
         alert("Alert something!");
  
         var year= $("#year").val();
         var month= $("#month").val();
  
         $.ajax({
              type: "POST",
              url: "getMonthDays.php",
              dataType: "html",   //expect html to be returned
              data: {year: year, month: month}
              }).done(function(msg){
                  if(parseInt(msg)!=0)    //if no errors
                  {
                      $('#days').html(msg);    //load the returned html into days
                  }
              });
  
      });
  
    &lt;/script&gt;
  
      &lt;select id="year"&gt;
          &lt;option value="2012"&gt;2012&lt;/option&gt;
          &lt;option value="2013"&gt;2013&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;select id="month"&gt;
          &lt;option value="1"&gt;1&lt;/option&gt;
          &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;select id="day"&gt;
          &lt;div id="daysInMonth"&gt;&lt;/div&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>getDaysInMonth.php</p>
  
  <pre><code>&lt;?php
  
      function getDaysInMonth($month, $year){
      return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year %400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);
  }
  
      $year = $_POST["year"];
      $month = $_POST["month"];
  
      $daysInMonth = getDaysInMonth($month, $year);
  
      $string = "&lt;option value=\"0\"&gt;Den:&lt;/option&gt;";
  
      for($i = 1; $i &lt;= $daysInMonth; $i++){
          $string .= "&lt;option value=\"$i\"&gt;$i&lt;/option&gt;";
      }
  
      echo $string;
  
  ?&gt;
  </code></pre>