I have this code :
HTML
<select disabled class="kurir full-width" data-init-plugin="select2" name="kurir" data-productid="316">
...
</select>
jQuery
$(".kurir").change(function() {
var productid = $(this).getAttribute('data-productid');
alert (productid);
});
Why I can't get 316 from data-productid? What did I missed here?
Thank you.
.attr('data-productid');