HTML for select and options:
<select class="dropdown">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
I want the value of the option at index 1, something along the lines of
$('.dropdown[1]').value
// should return 'two'
eq() will start with 0 as it is an index
Get the currently selected value with
use
text()
instead ofval()
to retrieve the text contentTo get the text:
You can use this to get the value:
An this to get the text:
Demo here