core/src/ons/animit.js
function(transition, options) {
    var queue = this.transitionQueue;

    if (transition && options) {
      options.css = transition;
      transition = new Animit.Transition(options);
    }

    if (!(transition instanceof Function || transition instanceof Animit.Transition)) {
      if (transition.css) {
        transition = new Animit.Transition(transition);
      } else {
        transition = new Animit.Transition({
          css: transition
        });
      }
    }

    if (transition instanceof Function) {
      queue.push(transition);
    } else if (transition instanceof Animit.Transition) {
      queue.push(transition.build());
    } else {
      throw new Error('Invalid arguments');
    }

    return this;
  }
function(transition, options) {
    var queue = this.transitionQueue;

    if (transition && options) {
      options.css = transition;
      transition = new Animit.Transition(options);
    }

    if (!(transition instanceof Function || transition instanceof Animit.Transition)) {
      if (transition.css) {
        transition = new Animit.Transition(transition);
      } else {
        transition = new Animit.Transition({
          css: transition
        });
      }
    }

    if (transition instanceof Function) {
      queue.push(transition);
    } else if (transition instanceof Animit.Transition) {
      queue.push(transition.build());
    } else {
      throw new Error('Invalid arguments');
    }

    return this;
  }
function ( transition , options ) { var queue = this . transitionQueue ; if ( transition && options ) { options . css = transition ; transition = new Animit . Transition ( options ) ; } if ( ! ( transition instanceof Function || transition instanceof Animit . Transition ) ) { if ( transition . css ) { transition = new Animit . Transition ( transition ) ; } else { transition = new Animit . Transition ( { css : transition } ) ; } } if ( transition instanceof Function ) { queue . push ( transition ) ; } else if ( transition instanceof Animit . Transition ) { queue . push ( transition . build ( ) ) ; } else { throw new Error ( 'Invalid arguments' ) ; } return this ; }
Queue transition animations or other function.

e.g. animit(elt).queue({color: 'red'})
e.g. animit(elt).queue({color: 'red'}, {duration: 0.4})
e.g. animit(elt).queue({css: {color: 'red'}, duration: 0.2})

@param {Object|Animit.Transition|Function} transition
@param {Object} [options]
Queue transition animations or other function .