Skip to content

Commit acc4791

Browse files
Updated README.md with combobox options
1 parent 2fb999c commit acc4791

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ Then just activate the plugin on a normal select box(suggest having a blank opti
2727
});
2828
</script>
2929

30+
### Options
31+
32+
When activating the plugin, you may include an object containing options for the combobox
33+
34+
$('.combobox').combobox({bsVersion: '2'});
35+
36+
`menu`: Custom markup for the dropdown menu list element.
37+
38+
`item`: Custom markup for the dropdown menu list items.
39+
40+
`matcher`: Custom function with one `item` argument that compares the item to the input. Defaults to matching on the query being a substring of the item, case insenstive
41+
42+
`sorter`: Custom function that sorts a list `items` for display in the dropdown
43+
44+
`highlighter`: Custom function for highlighting an `item`. Defaults to bolding the query within a matched item
45+
46+
`template`: Custom function that returns markup for the combobox.
47+
48+
`bsVersion`: Version of bootstrap being used. This is used by the default `template` function to generate markup correctly. Defaults to '3'. Set to '2' for compatibility with Bootstrap 2
49+
3050
## Live Example
3151

3252
http://dl.dropbox.com/u/21368/bootstrap-combobox/index.html

0 commit comments

Comments
 (0)