davidstutz/bootstrap-multiselect — pull request #401 by kayhadrin (2014-10-09 06:26:44+00:00)
Title: Features/support preselection and caption on options

1. Add ability to make an option pre-selected from `dataprovider()`.

```js
var data = [
{ label: 'Cheese', value: 'cheese', selected: true },
{ label: 'Tomatoes', value: 'tomatoes' }
];
$('multiselect').multiselect('dataprovider', data);
```

2. Add ability to set a title attribute on the option LABEL tags (visible on hover) from the `OPTION[title]` attribute.

You can do it with the raw HTML select box:

```html

Cheese

Tomatoes

Mozzarella

```

Or you can do it with `dataprovider()` as follow:

```js
var data = [
{ label: 'Cheese', value: 'cheese', caption: 'Swiss cheese' },
{
title: 'This is an optgroup title',
children: [
{ label: 'Cheese', value: 'cheese', caption: 'Smelly' },
{ label: 'Tomatoes', value: 'tomatoes', caption: 'Handsome' }
]
}
];
$('multiselect').multiselect('dataprovider', data);
```