Hi,
I have the following drop down menu:
<select id="target">
<option value="0">Zero ($123.45)</option>
<option value="1">One ($99.99)</option>
<option value="2">Two ($4.50)</option>
</select>
Using jQuery, how can I select the contents of the selected option's ()
brackets, i.e. 123.45
, 99.99
or 4.50
?
So far I have:
$("select#target option:selected").contents();
That just gives Zero ($123.45)
or equivalent though. How can I filter it further to get the number I'm looking for?
Thanks in advance.