title: Set selected value jQuery dropdownlist
body: <p>I am trying to set the selected value in a dropdownlist using jquery, I have this:</p>
  
  <pre><code> $('.option_vehiculo', '#form_login').each(function() 
  {
      if (this.id == tipo_vehiculo_def)
      {
           this.value = "option";
      };  
  });
  </code></pre>
  
  <p><code>.option_vehiculo</code> is a class that I give to all my dropdownlists so I can find them quickly.</p>
  
  <p>I iterate through all my form dropdownlists until I find the one I want to modify. Finding the select I want to change works fine, but I can't set the selected value, I tried this as I am doing with my input fields:</p>
  
  <pre><code>this.value = "option";
  </code></pre>
  
  <p>where option is an option inside my dropdownlist, but all I get from this is my dropdownlist with no selected value, it just appears with no text inside and with the possibility to select one of my available options.</p>
  
  <p>How do I set the selected value of a jQuery dropdownlist?</p>
  
  <hr>
  
  <p><strong>Attempts:</strong> I tried with this, but I am getting no results and I am not sure if I can use it with 'this' variable as the object I want to modify:</p>
  
  <pre><code>this.val("option");
  </code></pre>
  
  <p>tried this:</p>
  
  <pre><code>$('#tipo_vehiculo_1000').val("4");
  var test = $('#tipo_vehiculo_1000').val();
  </code></pre>
  
  <p>selecting my dropdownlist by id and trying to change my selected option and outputting it later and it keeps giving me the default value "0".</p>