select multiple jquery code example
Example 1: jquery or selector
$( "div, span, p.myClass" ).css( "border", "3px solid red" );
Example 2: jquery multiple selectors
Html:
<div>div</div>
<p class="myClass">p class="myClass"</p>
<p class="notMyClass">p class="notMyClass"</p>
<span>span</span>
Js:
<script>
$( "div, span, p.myClass" ).css( "border", "3px solid red" );
</script>
Example 3: jquery select2 multiple select all
$("#checkbox").click(function(){
if($("#checkbox").is(':checked') ){
$("select > option").prop("selected","selected");
}else{
$("select > option").removeAttr("selected");
}
});