I have this:
<select id='list'>
<option value='1'>Option A</option>
<option value='2'>Option B</option>
<option value='3'>Option C</option>
</select>
What might the selector resemble in the event that I needed to get "Alternative B" when I have the value '2'?
Kindly note that this isn't requesting that how get the chosen text value, however, any of them, if chosen, depending upon the value trait. I attempted:
$("#list[value='2']").text();
But it is not working.