add option to select jquery and set selected code example
Example 1: set select option as selected jquery
$(document).ready(function() {
$("#gate option[value='Gateway 2']").prop('selected', true);
});
Example 2: jquery add items to select input
$("#selectList").append(new Option("option text", "value"));
Example 3: how to append values to dropdown using jquery
BY LOVE
$.each(obj , function (key, value) {
$('#GroupName').append($('<option>',
{
value: value.id,
text: value.Group_Name
}));
Example 4: jquery set select value
$("div.id_100 select").val("val2");