code: function Callbacks( once ) {
          var list = [],
              stack = !once && [],
              fire = function( data ) {
                  memory = data;
                  fired = true;
                  firingIndex = firingStart || 0;
                  firingStart = 0;
                  firingLength = list.length;
                  firing = true;
  
                  for ( ; list && firingIndex < firingLength; firingIndex++ ) {
                      list[ firingIndex ].apply( data[ 0 ], data[ 1 ] );
                  }
                  firing = false;
  
                  if ( list ) {
                      if ( stack ) {
                          stack.length && fire( stack.shift() );
                      }  else {
                          list = [];
                      }
                  }
              },
              self = {
                  add: function() {
                      if ( list ) {
                          var start = list.length;
                          (function add ( args ) {
                              $.each( args, function( _, arg ) {
                                  var type = $.type( arg );
                                  if ( type === 'function' ) {
                                      list.push( arg );
                                  } else if ( arg && arg.length &&
                                          type !== 'string' ) {
  
                                      add( arg );
                                  }
                              });
                          })( arguments );
  
                          if ( firing ) {
                              firingLength = list.length;
                          } else if ( memory ) {
                              firingStart = start;
                              fire( memory );
                          }
                      }
                      return this;
                  },
  
                  disable: function() {
                      list = stack = memory = undefined;
                      return this;
                  },
  
                  // Lock the list in its current state
                  lock: function() {
                      stack = undefined;
                      if ( !memory ) {
                          self.disable();
                      }
                      return this;
                  },
  
                  fireWith: function( context, args ) {
                      if ( list && (!fired || stack) ) {
                          args = args || [];
                          args = [ context, args.slice ? args.slice() : args ];
                          if ( firing ) {
                              stack.push( args );
                          } else {
                              fire( args );
                          }
                      }
                      return this;
                  },
  
                  fire: function() {
                      self.fireWith( this, arguments );
                      return this;
                  }
              },
  
              fired, firing, firingStart, firingLength, firingIndex, memory;
  
          return self;
      }
docs: 简单版Callbacks, 默认memory，可选once.