davidstutz/bootstrap-multiselect — pull request #17 by Devristo (2013-02-08 16:41:16+00:00)
Title: KnockoutJS data binding support

Added KnockoutJS support by using a custom 'multiselect' binding handler.

The github diff is wrong. I only added the 'ko' related code at the top and changed the 'refresh' method and moved the creation of options into a function addOptions.

# Example:

## 1. Define select input
Note the **multiselect: true** binding!

```HTML

```

## 2. Initialize Bootstrap-multiselect
```javascript
$(".multiSelect").multiselect();
```

## 3 .Apply Knockout view model
As usual

# Notes
It is important to do initialize multiselect before applying the view model, since the custom binding code will hook into the onChange method to update the binding.