xAnimation Demos

xAniSize

Animate the size of an element.

Syntax

xAniSize(xa, w, h, tt[, at[, qc[, oed[, oea[, oef]]]]]);
  • xa - An xAnimation object. xa.e is assumed to be initialized to an Element object.
  • w - The target width.
  • h - The target height.
  • tt - Total time to change from current size to target size.
  • at - Acceleration type: 1=linear, 2=sine(fast start, slow at end), 3=cosine(slow start, fast at end).
  • 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.

xAniSize returns xa.

Demo Controls

Click a button to cause the corresponding method to be called for each xAnimation object.

pauseresumekill

Animating Size and Opacity

Cross-Browser

xAnimation