Answers for "on select2 select"

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

select2

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
Posted by: Guest on February-19-2021
0

select2

$(".js-example-basic-multiple-limit").select2({
  maximumSelectionLength: 3
});
Posted by: Guest on February-03-2021
-1

select2

$('.js-example-basic-single').select2({
  placeholder: 'Select an option'
});
Posted by: Guest on November-09-2020

Browse Popular Code Answers by Language