Yahoo! UI Library

button  1.0

Yahoo! UI Library > button > ButtonToggle
Search:
 
Filters

Class ButtonToggle - extends Y.Button

The ButtonToggle class provides a two-state button

Constructor

ButtonToggle ( cfg )
Parameters:
cfg <object> Configuration attributes

Properties

Y.ButtonToggle._CLASS_NAMES - protected static [Strings]

Class name suffixes for CSS classNames used in the widget. Produces the yui3-button-toggle-selected className to be added to the button if not within a ButtonGroup

Methods

_defPressFn

private void _defPressFn ( ev )
Overrides Button's _defPressFn to produce the two-state effect
Parameters:
ev <EventFacade>

Events

deselectedCallbackChange

deselectedCallbackChange ( event )
Fires when the value for the configuration attribute 'deselectedCallback' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

deselectedCallback - function or null

Function to be called when the toggle is deselected
Default Value: null


Copyright © 2011 Yahoo! Inc. All rights reserved.