| 58 | firingIndex, |
| 59 | // Add one or several callbacks to the list |
| 60 | add = function( args ) { |
| 61 | var i, |
| 62 | length, |
| 63 | elem, |
| 64 | type, |
| 65 | actual; |
| 66 | for ( i = 0, length = args.length; i < length; i++ ) { |
| 67 | elem = args[ i ]; |
| 68 | type = jQuery.type( elem ); |
| 69 | if ( type === "array" ) { |
| 70 | // Inspect recursively |
| 71 | add( elem ); |
| 72 | } else if ( type === "function" ) { |
| 73 | // Add if not in unique mode and callback is not in |
| 74 | if ( !flags.unique || !self.has( elem ) ) { |
| 75 | list.push( elem ); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | }, |
| 80 | // Fire callbacks |
| 81 | fire = function( context, args ) { |
| 82 | args = args || []; |