Catch data attribute after jQuery selectmenu
I can't seem to catch the data attribute after applying the jQuery UI select menu in it.
How can you get the data?
HTML:
<select class="drpmnu">
<option data-timings="something1">(01)</option>
<option data-timings="something2">(02)</option>
</select>
JavaScript:
$(".drpmnu").selectmenu({
change: function( event, ui ){
console.log($(this).data('timings'));
}
});
+3
source to share