Given the following HTML:
<select multiple>
<option value="1" selected>One</option>
<option value="2" selected>Two</option>
<option value="3">Three</option>
</select>
How can one get the selected option’s name’s One and Two rather than the options values 1 and 2.
$("select").val() would return the array ["1", "2"], which is undesired.
Here is one option:
DEMO: http://jsfiddle.net/ESRQR/