I have the following code:
<select name='exemplo' id='exemplo'>
<option value='1' class='teste' dado='a'>1</option>
<option value='2' class='teste' dado='b'>4</option>
<option value='3' class='teste' dado='c'>3</option>
<option value='4' class='teste' dado='d'>2</option>
</select>
I know that to get value
of option
I can use:
$('#exemplo').change(function(){
var valor=$(this).val();
)};
But what about getting the dado
attribute? How do you do?