Reputation: 3541
I would like to retrieve the value from a dropdown based on the text.
I know I could do this:
$('#RegionsFilterDropdown option:contains("item")').val()
However, this does not return an exact match. For example, if the dropdown has options "item 1", "item 2", etc. then the above code will return more than 1 result, which is not what I want.
Any suggestions?
Thanks Rob
Upvotes: 0
Views: 1707