select option jquery code example
Example 1: set select option as selected jquery
$(document).ready(function() {
$("#gate option[value='Gateway 2']").prop('selected', true);
// you need to specify id of combo to set right combo, if more than one combo
});
Example 2: how to get the selected text of dropdown in jquery
BY LOVE
$("#Id option:selected").text()
Example 3: jquery selected option text
$("#mySelect option:selected").html();
Example 4: get selected option value
var conceptName = $('#aioConceptName').find(":selected").val();
Example 5: select option value jquery
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
Example 6: jquery selected option
$( "#myselect option:selected" ).val();