select2.js code example
Example 1: select2
$('.js-example-basic-single').select2({
placeholder: 'Select an option'
});
Example 2: select2
$(".js-example-basic-multiple-limit").select2({
maximumSelectionLength: 3
});
Example 3: jquery select2
//Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.