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
Deselect all first and filter the selectable options:
$('.id_100 option') .removeAttr('selected') .filter('[value=val1]') .attr('selected', true)