xAnimation Demos
xAniOpacity
Animate the opacity of an element.
It seems that Firefox has a bug related to setting opacity to 1.0.
Syntax
xAniOpacity(xa, o, tt[, at[, qc[, oed[, oea[, oef]]]]]);
- xa - An xAnimation object. xa.e is assumed to be initialized to an Element object.
- o - The target opacity.
- tt - Total time to change from current opacity to target.
- at - Acceleration type: 1=linear, 2=sine(fast start, slow at end), 3=cosine(slow start, fast at end).
- qc - Cycles. Not valid for linear accel. Two cycles will take the element to the target and back to the start position.
- oed - onEnd delay. A delay (ms) before onEnd is called. If oed > 0 then no arguments are passed to onEnd.
- oea - onEnd argument. It will be passed to onEnd.
- oef - onEnd function. A function reference or a string. It will be called (or evaluated) at the completion of the animation. If it is a function it will receive two arguments: oef(xa, oea). If onEnd returns (or evaluates to) true then the animation will repeat.
xAniOpacity returns xa.
Demo Controls
Click a button to cause the corresponding method to be called for each xAnimation object.
pauseresumekill