­

Customization - Bootstrap Multiselect - Set Custom Text and Showing Numbers On Selection

17:13

Following is a short note on how to customize the display in Bootstrap Multiselect. I had encountered difficult in finding the documentation online. Hence after go through the js itself, there are options for us to set the text when none is selected/all are selected and options like to show the total number when all are selected.
Bootstrap-Multiselect component is one of the best extension to the existing twitter bootstrap.
[code language="javascript"]
$('#filterByTag').multiselect({
buttonWidth: '150px',
nonSelectedText: 'None',
allSelectedText: 'All',
selectAllNumber: false
});
[/code]
Above explain that, if we want to set our custom text when nothing is selected we set to 'nonSelectedText', same goes to when all are selected, we set to 'allSelectedText'. Meanwhile, to show or hide the numbers when all are selected, we set to 'selectAllNumber'.
Cheers.

You Might Also Like

0 comments