title: jquery select selected value undefined
body: <p>i have problem with this line  <code>var value = $("#opstina option:selected").val();</code> , but only in chrome i get that value is undefined. In FireFox, and IE, works fine, only in chrome i get this warning. Does someone know why? Html code is </p>
  
  <pre><code>&lt;select id="opstina" name="opstina"&gt;
        &lt;option value="0"&gt;Izaberite Mesto&lt;/option&gt;
        &lt;option value="1" selected="selected"&gt;Novi Sad-grad 1&lt;/option&gt;
       &lt;option value="2"&gt;Beograd-Stari Grad&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>This is my jquery code </p>
  
  <pre><code>if ($("#drzava option:selected").length) {
                      $("select#opstina").attr("disabled","disabled");
                      $("select#opstina").html("&lt;option&gt;wait...&lt;/option&gt;");
                      var id = $("select#drzava option:selected").attr('value');
                          $.post("select_opstina.php", {id:id}, function(data){
                          $("select#opstina").removeAttr("disabled");
                           alert( "html koji bi trebao biti upisan u select:\n\n" + data );
                          $("select#opstina").html(data);
              });
                          if ($("#opstina option:selected").length) {
                          alert('Došao sam pred petlju');
                           var value = $("#opstina option:selected")[0].value;
                           alert(value);
                          var sel = $("#opstina").val();
                          if (sel!=0) {
                                alert('Ušao sam u petlju, i selektovano polje za opštinu je' + sel );
              $("select#mesto").attr("disabled","disabled");
              $("select#mesto").html("&lt;option&gt;wait...&lt;/option&gt;");
              var id= $("select#opstina option:selected").attr('value');
              alert(id);
              $.post("select_mesto.php", {id:id}, function(data){
                  alert("html koji bi trebao biti upisan u select:\n\n" + data );
                  $("select#mesto").removeAttr("disabled");
                  $("select#mesto").html(data);
              });
          }
      }
  
                  } 
  }
  </code></pre>