togglebar
A button group in which one button can be toggled at any time.
Syntax
<div data-juci="togglebar" data-toggled="2">
<button data-juci="button">1st</button>
<button data-juci="button">2nd</button>
<button data-juci="button">3rd</button>
</div>
Listeners to events can be attached by using Observable#bind, or listeners can be bound in the HTML declaration of the control using on+'name of event', for e.g: onclick=handleClick(event). Listeners can be removed through Observable#unbind
Attributes
Methods
-
toggle(idx) ¶Toggles the button at the specified index.Parameters:
-
idx{String}
The index of the button that is to be toggled on.
- See:
-
idx{String}
Events
-
toggle(eventObj) ¶ CancellableFires when user taps on a button in the togglebar which is not toggled.Parameters:
-
eventObj{EventObject}
-
newToggled{Number}
The index of the button that is currently tapped.
-
oldToggled{Number}
The index of the button that is toggled on.
-
newToggled{Number}
-
eventObj{EventObject}