I just wonder if is it posible to have option elements in html with data- attributes and so, if that posible how to retrive this value.
More specific. Lets say I have the following code:
<select name="areas" id="areas">
<option value="1" data-lat="12.243" data-lng="32.43242">Area name</option>
<option value="2" data-lat="14.243" data-lng="34.43242">Area name</option>
<option value="3" data-lat="16.243" data-lng="36.43242">Area name</option>
<option value="4" data-lat="18.243" data-lng="38.43242">Area name</option>
</select>
then, is it any way to get the data-lat and data-lng for from the selected option via jQuery ?
.data('lat')and.data('lng')be more appropriate?