I want to select an option on a html select. For example, a select with:
<select id="list">
<option>Jan</option>
<option>Feb</option>
<option>Mar</option>
<option>Apr</option>
</select>
I can do something like this if I know the value for the option, for example:
<option value="0">Jan</option>
$("#list option:eq(0)").attr("selected", "selected");
Can I use the value between the option tag?
$('#list option:contains(Mar)').prop('selected', true)