harvesthq/chosen — pull request #964 by thomasf1 (2013-01-04 15:51:08+00:00)
Title: Template support

Based on cjstewart88s Template extension, with some improvements:
1. The templates are used for displaying not only in the dropdown, but also for selected values and the default values (basically everyhere a Option is displayed)
2. The Template gets handed the text and the value of an Option
3. Updated to work with the latest Version

# DOM
```htm

M&Ms

Starburst

Skittles

Reese's

Snickers

```
# Usage
```javascript
$(".chzn-select-template-example").chosen({
template: function (text, value, templateData) {
return text + " type: " + templateData.type + " value: " + value;
}
});
```

# Result
![example page](https://f.cloud.github.com/assets/937467/43421/081f32cc-5686-11e2-9fe5-35b9a68fc020.png)

# More example usages (with customized CSS):
Single select:
![chosen_single](https://f.cloud.github.com/assets/937467/43363/9b66c4a4-5682-11e2-9128-bc5831f6d111.png)
Multi select:
![chosen_multi](https://f.cloud.github.com/assets/937467/43364/9b7f1220-5682-11e2-9b29-277ec7807b77.png)