Answers for "select2 option data attributes"

2

select2 get data attribute value

$('#mySelect2').on('select2:select', function (e) {
    var data = e.params.data;
    console.log(data);
});
Posted by: Guest on July-20-2020
0

select2 get data attribute value

$('#payment_method').select2('data')[0]
Posted by: Guest on July-20-2020

Browse Popular Code Answers by Language