I\'m using the Bootstrap-Select plugin like this:
HTML:
You can set the selected value by calling the val method on the element.
$('.selectpicker').selectpicker('val', 'Mustard');
$('.selectpicker').selectpicker('val', ['Mustard','Relish']);
This will select all items in a multi-select.
$('.selectpicker').selectpicker('selectAll');
details are available on site : https://silviomoreto.github.io/bootstrap-select/methods/