Answers for "select2 javascript"

-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

jquery select2 multiple select all

$("#checkbox").click(function(){
    if($("#checkbox").is(':checked') ){
        $("select > option").prop("selected","selected");
    }else{
        $("select > option").removeAttr("selected");
     }
});
Posted by: Guest on September-15-2020
0

select2

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

select2 documentation

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

Browse Popular Code Answers by Language