}
ar.push( fn );
if ( ops.memory )
{
// after added , call it immediately
fn.call( this, lastArgs );
}
}
return this;
};
// remove a function
this.remove = function ( fn )
{
if ( typeof ( fn ) === ‘function’
&& fn.name !== ”
&& ar.length > 0 )
{
for ( var i = 0; i < ar.length; i++ )
{
if ( ar[i].name === fn.name )
{










