Now, I have retrieved the element data. But, I don’t know how to get data of data-properties
I tried:
$('#checkout_shipping_address_id').on('select2:select', function (e) {
var data = e.params.data;
console.log(data.element.getAttribute[data-properties]);
});
but It's not working
2
Answers
change
instead ofselect
attr
method.try this with selected handler.