jQuery Combo Box is developed base on a jQuery plugin (jQuery Editable Select), and adopted the Trend Micro Style Portal.
<!DOCTYPE html>
<html>
<head>
<link href="combobox.css" media="screen" rel="stylesheet">
</head>
<body>
<select id="combobox" class="input-width-default form-control" data-toggle="combobox">
<option>France</option>
<option>Germany</option>
<option>Syria</option>
<option>Tahiti</option>
<option>Taiwan</option>
<option>Tajikistan</option>
</select>
<script src="combobox.js"></script>
</body>
</html>$('#combobox').combobox(options);| Name | Type | Default | Description |
|---|---|---|---|
| value | String | None | Set default value initially. |
| clearable | Boolean | true | The value can be empty or not. |
| disabled | Boolean | false | manipulate whether a combobox component will be enabled or disabled initially. |
| placeholder | String | Select... | Placeholder text for the filter input. |
| Name | Parameters | Return | Description |
|---|---|---|---|
| setValue | Value (String) | None | Set value after initialization |
| getValue | None | Value (String) | Get value after initialization |
| enable | None | None | Enables the combobox after initialization. |
| disable | None | None | Disables the combobox after initialization. |
| destroy | None | None | Removes the combobox functionality completely. This will return the element back to its pre-init state. |
| Name | Parameters | Description |
|---|---|---|
| change.combobox(event, value) | Event (Object), value (String) | Triggered when an option is changed. |
| show.combobox(event, items) | Event (Object), Collection of values (Array) | Triggered when the options menu is shown. |