Very simple question I hope.
I have the usual <select>
box like this
<select id=select>
<option value=1>this</option>
<option value=2>that</option>
<option value=3>other</option>
</select>
I can get the selected value (by using $(#select).val()
) and the selected item's display value (by using $(#select :selected).text()
.
But how can I store like an additional value in the <option>
tag? I would like to be able to do something like <option value=3.1 value2=3.2>other</option>
and get the value of the value2
attribute (which would be 3.2 in the example).