This question already has an answer here:
I have the following HTML
<SELECT id='cars'> <OPTION value='1'>Car One</option> <OPTION value='2'>Second Car</option> <OPTION value='3'>Another Car</option> </SELECT>
And I know that I can change the selected value of the drop-down control to any value using:
$('#cars').val(2); // This will make the combo text: Second Car
But how can I select a value using the text rather than the value?
What I need to do is something like:
but that has no effect...