I am trying to fetch data from currently selected option. I came out with this.
Could i somehow improve it or is this fine?
Im specially not sure about the current option selector.
<option data-id='one'></option>
....
$('select#first').change(function(){
var smth = $("option:selected",this).data('id');
alert(smth);
});
Looks like just this should work,,
Check this FIDDLE