I have this;
<select id='list'>
<option value='1'>First</option>
<option value='2'>Second </option>
<option value='3'>Third </option>
</select>
i want to specifically get the option selected and put it an a variable, then alert what's in the variable.
I tried
var value = $("#list option:selected").text();
alert(value);
but its not working :(
Ps: i need the selected value in a variable.
Thanks