jquery change select option value and text code example
Example 1: select option value jquery
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
Example 2: jquery select option by text
$("#myDropdown option:contains(Option 2)").attr('selected', 'selected');
Example 3: jquery get selected option value
jquery get selected option value