title: ie9 dropdown not set to the first value
body: ###########Update
  
  <p>Here is the original code that worked in ie7 but not in 9. I updated and thought both were ok.</p>
  
  <pre><code>if(max_ch&gt;0){
  var newDiv = $('&lt;div&gt;Room '+(i+1)+
      ' &lt;select class="adu" name="data[Rate]['+r_id+']['+ro_id+
      '][adults][]"&gt;&lt;/select&gt; adults. &lt;select class="chi" name="data[Rate]['+r_id+
      ']['+ro_id+'][children][]"&gt;&lt;/select&gt; children.&lt;/div&gt;'
  );
  newDiv.attr("id","occupants"+i).appendTo(showdiv+' .rooms_adults');
  
  var roomPrice = $('&lt;input type="hidden" name="data[Rate]['+r_id+']['+ro_id+'][prices][]" value="'+room_bo+'" /&gt;');
  roomPrice.attr("id","roomprice"+i).appendTo(showdiv+' .rooms_adults');
  
  var num_opts = Number(max_ad) + 1,
      slc_adu = $(showdiv+' #occupants'+i+' select.adu');
  for( ad=0; ad &lt; num_opts; ad++){
      slc_adu.append("&lt;option value=\"" + ad + "\"&gt;" + ad + "&lt;/option&gt;");
  }
  
  var num_opts = Number(max_ch) + 1,
      slc_ch = $(showdiv+' #occupants'+i+' select.chi');
  for( ch=0; ch &lt; num_opts; ch++){
      slc_ch.append("&lt;option value=\"" + ch + "\"&gt;" + ch + "&lt;/option&gt;");
  }
  
  $(showdiv+' #occupants'+i+' select.adu').val('1');                  
  </code></pre>
  
  <p>}</p>
  
  <p>I have some jquery to build drop-down boxes. I want the drop-downs to have the first value already selected in them. This happens on all browser except ie9.</p>
  
  <p>It has a blank record as the first value.</p>
  
  <pre><code>            $('.rooms_select select' ).change(function(){
  
                  var showdiv = '#div_'+$(this).attr('id');
                  var r_id    = $(showdiv+' .rate_data').val();
                  var ro_id   = $(showdiv+' .room_data').val();
                  var min_ad  = $(showdiv+' .room_data').attr('minadults');                   
                  var max_ad  = $(showdiv+' .room_data').attr('maxadults');
                  var max_ch  = $(showdiv+' .room_data').attr('maxchildren');
                  var total_price = $(showdiv+' .rate_data').attr('total_price');
                  var price_quote = $(showdiv+' .rate_data').attr('rel');
                  var rooms = $(this).val();
                  var room_bo = 0;
  
                  //$(showdiv+' .room_data').attr('numrooms', rooms);
  
                  room_price = calc_rprice(showdiv,total_price,price_quote,rooms);
                  // NEW THING
                  room_bo = Number(room_price/rooms);
  
                  $(showdiv).slideDown("slow");
                  $(showdiv+' .rooms_adults').html('&lt;span&gt;Please select number of occupants.&lt;/span&gt;');
                  for( i=0; i &lt; rooms; i++){
  
                      if(max_ch&gt;0){
                          var newDiv = $('&lt;div&gt;Room '+(i+1)+' &lt;select class="adu" name="data[Rate]['+r_id+']['+ro_id+'][adults][]"&gt;&lt;/select&gt; adults. &lt;select class="chi" name="data[Rate]['+r_id+']['+ro_id+'][children][]"&gt;&lt;/select&gt; children.&lt;/div&gt;');
                          newDiv.attr("id","occupants"+i).appendTo(showdiv+' .rooms_adults');
  
                          var roomPrice = $('&lt;input type="hidden" name="data[Rate]['+r_id+']['+ro_id+'][prices][]" value="'+room_bo+'" /&gt;');
                          roomPrice.attr("id","roomprice"+i).appendTo(showdiv+' .rooms_adults');
  
                          var roomTotalPrice = $('&lt;input type="hidden" name="data[Rate]['+r_id+']['+ro_id+'][roomTotalPrice][]" value="'+room_price+'" /&gt;');
                          roomTotalPrice.attr("id","roomTotalPrice"+i).appendTo(showdiv+' .rooms_adults');
  
                          var num_opts = Number(max_ad) + 1,
                              slc_adu = $(showdiv+' #occupants'+i+' select.adu');
                          for( ad=min_ad; ad &lt; num_opts; ad++){
                              slc_adu.append("&lt;option value=\"" + ad + "\"&gt;" + ad + "&lt;/option&gt;");
                          }
  
                          var num_opts = Number(max_ch) + 1,
                              slc_ch = $(showdiv+' #occupants'+i+' select.chi');
                          for( ch=0; ch &lt; num_opts; ch++){
                              slc_ch.append("&lt;option value=\"" + ch + "\"&gt;" + ch + "&lt;/option&gt;");
                          }
  
                          $(showdiv+' #occupants'+i+' select.adu').val('1');
                          $("select :first-child").each(function () {
                              $(this).attr("selected", true);
                          });
  
                      } else {
                          var newDiv = $('&lt;div&gt;Room '+(i+1)+' &lt;select class="adu" name="data[Rate]['+r_id+']['+ro_id+'][adults][]"&gt;&lt;/select&gt; adults.&lt;/div&gt;');         
                          newDiv.attr("id","occupants"+i).appendTo(showdiv+' .rooms_adults');
  
                          var roomPrice = $('&lt;input type="hidden" name="data[Rate]['+r_id+']['+ro_id+'][prices][]" value="'+room_bo+'" /&gt;');
                          roomPrice.attr("id","roomprice"+i).appendTo(showdiv+' .rooms_adults');
  
                          var roomTotalPrice = $('&lt;input type="hidden" name="data[Rate]['+r_id+']['+ro_id+'][roomTotalPrice][]" value="'+room_price+'" /&gt;');
                          roomTotalPrice.attr("id","roomTotalPrice"+i).appendTo(showdiv+' .rooms_adults');
  
                          var num_opts = Number(max_ad) + 1,
                              slc_adu = $(showdiv+' #occupants'+i+' select.adu');
                          for( ad=min_ad; ad &lt; num_opts; ad++){
                              slc_adu.append("&lt;option value=\"" + ad + "\"&gt;" + ad + "&lt;/option&gt;");
                          }
                          $(showdiv+' #occupants'+i+' select.adu').val('1');
                          $("select :first-child").each(function () {
                              $(this).attr("selected", true);
                          });
  
  
                      }
  
                  calc_rprice(showdiv,total_price,price_quote,rooms);
  
  
              });
  </code></pre>