Class: Toggler {#Toggler}
Attaches an event handler to an element to toggle a tween transition of an element.
Demo
Demo
Extends:
Fx.Tween.Toggle
Toggler Method: constructor {#Toggler:constructor}
Syntax:
var myToggler = new Toggler(element, toggler, options);
Arguments:
- element - (mixed) An Element or the string id of an Element to apply the transition to.
- toggler - (mixed) An Element or the string id of an Element to attach the toggle event to.
- options - (object) The Fx.Tween.toggle options object, plus the options described below:
Options:
- event - (string: defaults to
click) The event to attach to the toggler element.
Toggler Method: attach {#Toggler:attach}
Syntax:
myToggler.attach():
Returns:
This Toggler Instance.
Toggler Method: detach {#Toggler:detach}
Syntax:
myToggler.detach():
Returns:
This Toggler Instance.