jQuery EasyUI Menu and Button Plugin - Splitbutton
jQuery EasyUI Plugins
Extends $.fn.linkbutton.defaults. Override the defaults through $.fn.splitbutton.defaults.
Similar to the menubutton, the splitbutton is also related to the linkbutton and the menu. Unlike the menubutton, the splitbutton is divided into two parts. When the mouse moves over the splitbutton, a dividing line is shown. The menu is displayed only when the mouse moves over the right part of the splitbutton.
Depends on
- menubutton
Usage
Create a splitbutton from markup.
Ok
Ok
Cancel
Create a splitbutton using JavaScript.
Ok
...
$('#sb').splitbutton({
iconCls: 'icon-ok',
menu: '#mm'
});
property
This property extends the linkbutton; the following are properties added by the splitbutton.
| Name | Type | Description | Default value |
|---|---|---|---|
| plain | boolean | If set to true, a simple effect is shown. | true |
| menu | string | The selector used to create the corresponding menu. | null |
| duration | number | The duration, in milliseconds, for displaying the menu when hovering over the button. | 100 |
Method
This method inherits from the linkbutton; the following are methods added or overridden by the splitbutton.
| Name | Parameters | Description |
|---|---|---|
| options | none | Return the options object. |
| disable | none | Disables the splitbutton. Example code: |
$('#sb').splitbutton('disable');| onSelect | event | enable | none | Enables the splitbutton. Example code:
$('#sb').splitbutton('enable');
| onSelect | event | destroy | none | Destroys the splitbutton. |
jQuery EasyUI Plugins