The following is taken from http://davidstutz.imtqy.com/bootstrap-multiselect/ : I am currently using this solution with bootstrap 3.3.1 and bootstrap-multiselect v0.9.8 Remember to add a false parameter to the "selectAll" function, so as this will allow you to select all the parameters without first opening the drop-down list.
HTML example:
<select class="multiselect" id="my-multi-select" name="options[]" multiple="multiple"> <option>1</option> <option>2</option> </select>
Javascript example:
$(function() { $('#my-multi-select').multiselect({ includeSelectAllOption: true }); $("#my-multi-select").multiselect('selectAll', false); $("#my-multi-select").multiselect('updateButtonText'); });
source share