Class MochiKit.Widget.Button
Extends
MochiKit.Widget.
The button widget class. Used to provide a simple push
button, using the <button> HTML element. In particular,
the "onclick" event is usually of interest.
Defined in: Widget.js.
Constructor Attributes | Constructor Name and Description |
---|---|
MochiKit.Widget.Button(attrs)
Creates a new button widget.
|
Field Attributes | Field Name and Description |
---|---|
The button disabled flag.
|
- Fields borrowed from class MochiKit.Widget:
- _id, Classes
Method Attributes | Method Name and Description |
---|---|
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
|
- Methods borrowed from class MochiKit.Widget:
- _animQueueId, _createWidgetTreeElem, _eventHandler, _widgetMixin, addAll, addChildNode, addClass, animate, blurAll, createWidget, createWidgetTree, destroy, destroyWidget, emitSignal, getChildNodes, hasClass, hide, isFormField, isHidden, isWidget, removeAll, removeChildNode, removeClass, setStyle, show, toggleClass
Class Detail
MochiKit.Widget.Button(attrs)
Creates a new button widget.
var widget = MochiKit.Widget.Button({ highlight: true }, "Find");
- Parameters:
- {Object} attrs
- the widget and node attributes
- {Boolean} attrs.highlight Optional
- the highlight option flag
- {Object} ... Optional
- the child widgets or DOM nodes
- Returns:
- {Widget} the widget DOM node
Field Detail
{Boolean}
disabled
The button disabled flag.
Method Detail
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
- Parameters:
- {Object} attrs
- the widget and node attributes to set
- {Boolean} attrs.highlight Optional
- the highlight option flag