Anim

A class for constructing animation instances.

parents: Event.Target

defined in: base.js

Class

  • Anim (elem, props, duration, easing, callback)

Methods


Class Detail

  • Anim (elem, props, duration, easing, callback)
    A class for constructing animation instances.
    Parameters
    •   elem {HTMLElement|window} Html dom node or window (window can only animate scrollTop/scrollLeft)
    •   props {Object} style map
    • [ duration ] {Number|Object} duration(s) or anim config
    • [ duration.easing ] {String|Function} easing fn or string
    • [ duration.complete ] {Function} callback function when this animation is complete
    • [ duration.duration ] {Number} duration(s)
    • [ duration.queue ] {String|Boolean} current animation's queue, if false then no queue
    • [ easing ] {Function|String} easing fn or string
    • [ callback ] {Function} callback function when this animation is complete

Methods Detail

  • isRunning () view source
    Returns
    • {Boolean} whether this animation is running
  • run () view source
    start this animation
  • stop (finish) view source
    stop this animation
    Parameters
    • [ finish ] {Boolean} whether jump to the last position of this animation
blog comments powered by Disqus
Top