$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
$('#id :selected').text();
$('#mySelect2').val(['1', '2']);
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
$("#checkbox").click(function(){
if($("#checkbox").is(':checked') ){
$("select > option").prop("selected","selected");
}else{
$("select > option").removeAttr("selected");
}
});