I have a select field with some options in it. Now I need to select one of those options with jQuery. But how can I do that when I only know the
select
options
It's better to use change() after setting select value.
change()
$("div.id_100 select").val("val2").change();
By doing this, the code will close to changing select by user, the explanation is included in JS Fiddle:
JS Fiddle