iegorov
1/24/2014 - 2:52 AM

Selected in drop down list

Selected in drop down list

$("#affects_list option[value=" + val + "]").prop('selected', true);
var $affectsList = $("#affects_list");
//deselect all
$affectsList.val([]);
//using array
$affectsList.val([val1, val2, val3]);