class S2.FX.Element


Base class for effects that change DOM elements. This is the base class for the most important effects implementation S2.FX.Morph, but can be used as a base class for non-CSS based effects too.




new S2.FX.Element(element[, options])

See S2.FX.Base for a description of the options argument.

Instance methods

  • animate #

    S2.FX.Element#animate(operator[, args...]) -> undefined
    • operator (String) – lowercase name of an S2.FX.Operator

    Starts an animation by using a S2.FX.Operator on the element that is associated with the effect.

    The rest of the arguments are passed to Operators' constructor. This method is intended to be called in the setup instance method of subclasses, for example:

    // setup method from S2.FX.Style
    setup: function() {
      this.animate('style', this.element, { style: });
  • play #

    S2.FX.Element#play([element[, options]]) -> S2.FX.Base

    Starts playing the element effect. The optional element argument can be used to reuse this instance on a different element than for which it was used originally.