.button()
Categories: UI
.button( [ options ] )
Plugin: jQuery.ui.button
Description: Apply the Button widget for each element in the set of matched elements
-
.button( [ options ] )
version added: 1.0options A map of additional options pass to the widget.
Button enhances standard form elements like button, input of type submit or reset or anchors to themable buttons with appropiate mouseover and active styles.
In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons: Their associated label is styled to appear as the button, while the underlying input is updated on click.
In order to group radio buttons, Button also provides an additional widget-method, called Buttonset. Its used by selecting a container element (which contains the radio buttons) and calling buttonset(). Buttonset will also provide visual grouping, and therefore should be used whenever you have a group of buttons. It works by selecting all descendents and applying button() to them. You can enable and disable a buttonset, which will enable and disable all contained buttons. Destroying a buttonset also calls the button's destroy method.
When using an input of type button, submit or reset, support is limited to plain text labels with no icons.
-
create
This event is triggered when button is created.
-
destroy
-
.button( "destroy" )
version added: 1.0
Remove the button functionality completely. This will return the element back to its pre-init state.
-
-
disable
-
.button( "disable" )
version added: 1.0
Disable the button.
-
-
enable
-
.button( "enable" )
version added: 1.0
Enable the button.
-
-
option
-
.button( "option" , optionName , [value] )
version added: 1.0
Get or set any button option. If no value is specified, will act as a getter.
-
-
option
-
.button( "option" , options )
version added: 1.0
Set multiple button options at once by providing an options object.
-
-
widget
-
.button( "widget" )
version added: 1.0
Returns the .ui-button element.
-
-
refresh
-
.button( "refresh" )
version added: 1.0
Refreshes the visual state of the button. Useful for updating button state after the native element's checked or disabled state is changed programatically.
-