A super-flexible and clean JQuery Dropdown Plugin based on dot.js Templates.
<select data-template="#dropdown">
<option value="1" selected="selected">Super</option>
<option value="2">Awesome</option>
<option value="3">Dropdown</option>
</select>
<script id="dropdown-selected" type="text/x-dot-template">
{{=it.label}}<div class="arrow"><i></i></div>
</script>
<script id="dropdown" type="text/x-dot-template">
<div class="dropdown" tabindex="1">
<div class="selected">{{=it.selected.label}}</div>
<ul>
{{~it.items :item:index}}
<li data-index="{{=index}}">{{=item.label}}</li>
{{~}}
</ul>
</div>
</script>
$('select').dropdown();
For example you want to add a count
for every item to show in the select menu next to the label.
<select data-template="#dropdown">
<option value="1" data-count="2" selected="selected">Super</option>
<option value="2" data-count="5">Awesome</option>
<option value="3" data-count="1">Dropdown</option>
</select>
{{=item.count}}
Coded by Roger Dudler http://twitter.com/rogerdudler