Answers for "select 2 on change jquery"

2

select2.org events

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

jquery on change on multiple elements

$('.class1, .class2').on('click', function () {console.log('TODO...')});

//OR....

var elem1 = $('.class1');
var elem2 = $('.class2');
elem1.add(elem2).on'click', function () {console.log('TODO...')});
Posted by: Guest on March-25-2021

Code answers related to "select 2 on change jquery"

Browse Popular Code Answers by Language