[jQuery] getting xhtml custom data in select box
Hello,
I have the following selectbox xhtml structure:
<select id="price_item_1">
<option value="50" data:interval="1">Volvo</option>
<option value="100" data:interval="0">Saab</option>
<option value="49.99" data:interval="0">Mercedes</option>
<option value="19.99" data:interval="1">Audi</option>
</select>
Now I want to get the data:interval attribute value of the selected
option.
Which syntax should I use with jquery selector?
Currently I have:
$("select[id^=price_item_]").attr("data:interval")
but this obviously wont work.
Any help is highly appreciated!