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 stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #multiple #select
ADD COMMENT
Topic
Name
3+8 =