Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery select2 multiple select all

$("#checkbox").click(function(){
    if($("#checkbox").is(':checked') ){
        $("select > option").prop("selected","selected");
    }else{
        $("select > option").removeAttr("selected");
     }
});
Source by select2.org #
 
PREVIOUS NEXT
Tagged: #jquery #multiple #select
ADD COMMENT
Topic
Name
9+4 =