Documentation
The documentation contains Options, Events, Methods.
The documentation contains Options, Events, Methods.
The options are defined in jQuery.fn.groupSelect.defaults
.
Name | Attribute | Type | Default | Description |
---|---|---|---|---|
- | data-toggle | String | 'group-select' | Activate bootstrap group select without writing JavaScript. |
type | data-type | String | 'dropdown' | Defines the type of group select, can only be 'button' or 'dropdown'. |
value | data-value | String | 'undefined' | Defines the selected value of group select. |
data | data-data | Array | '[]' | Defines the data list of group select. |
defaultClass | data-default-class | String | 'btn btn-default' | Defines the default button class name. |
primaryClass | data-primary-class | String | 'btn btn-primary' | Defines the primary button class name. |
formatter | data-formatter | Function | function (value) { return value; } |
Format the value display. |
Option Event | jQuery Event | Parameter | Description |
---|---|---|---|
onSelect | select.bs.group-select | value |
Fires when select an item, the parameters contain: value: the value of selected item. |
The calling method syntax: $('#gs').groupSelect('method', parameter);
.
Name | Parameter | Description |
---|---|---|
getValue | none | Return the selected value of group select. |
setValue | value | Set the value of group select. |
getData | none | Return the data of group select. |
setData | data | Set the data of group select. |
enable | none | Enable group select. |
disable | none | Disable group select |