Extends Fx.Tween to store and execute toggling of the effect.
var myToggle = new Fx.Tween.Toggle(element, options);
0) The value to transition to on toggleOut (and setOut).1) The value to transition to on toggleIn (and setIn).var myToggle = new Fx.Tween.Toggle('element',{
property: 'height',
from: 0,
to: 300,
link: 'cancel',
onToggle: function(){
// do stuff
}
}).setIn();
Toggles the element in our out, depending on it's current status.
myToggle.toggle();
This Fx.Tween.Toggle instance.
Toggles the element in (options.to value), if already toggled in, nothing happens
myToggle.toggleIn();
This Fx.Tween.Toggle instance
Toggles the element out (options.from value), if already toggled in, nothing happens
myToggle.toggleOut();
This Fx.Tween.Toggle instance
Immediately sets the element to the options.to value without an animation.
myToggle.setIn();
This Fx.Tween.Toggle instance.
Immediately sets the element to the options.from state without an animation.
myToggle.setIn();
This Fx.Tween.Toggle instance.