public/javascripts/yui/event-delegate/event-delegate.js
function (container, type, fn) {

			var sType = type,
				returnVal = false,
				index,
				cacheItem;

			//	Look up the real event--either mouseover or mouseout
			if (type == "mouseenter" || type == "mouseleave") {
				sType = Event._getType(type);
			}

			index = Event._getCacheIndex(delegates, container, sType, fn);

		    if (index >= 0) {
		        cacheItem = delegates[index];
		    }


		    if (container && cacheItem) {

		        returnVal = Event.removeListener(cacheItem[0], cacheItem[1], cacheItem[3]);

				if (returnVal) {
	                delete delegates[index][2];
	                delete delegates[index][3];
	                delegates.splice(index, 1);
				}		
		
		    }

			return returnVal;

		}
function (container, type, fn) {

			var sType = type,
				returnVal = false,
				index,
				cacheItem;

			//	Look up the real event--either mouseover or mouseout
			if (type == "mouseenter" || type == "mouseleave") {
				sType = Event._getType(type);
			}

			index = Event._getCacheIndex(delegates, container, sType, fn);

		    if (index >= 0) {
		        cacheItem = delegates[index];
		    }


		    if (container && cacheItem) {

		        returnVal = Event.removeListener(cacheItem[0], cacheItem[1], cacheItem[3]);

				if (returnVal) {
	                delete delegates[index][2];
	                delete delegates[index][3];
	                delegates.splice(index, 1);
				}		
		
		    }

			return returnVal;

		}
function ( container , type , fn ) { var sType = type , returnVal = false , index , cacheItem ; //	Look up the real event--either mouseover or mouseout if ( type == "mouseenter" || type == "mouseleave" ) { sType = Event . _getType ( type ) ; } index = Event . _getCacheIndex ( delegates , container , sType , fn ) ; if ( index >= 0 ) { cacheItem = delegates [ index ] ; } if ( container && cacheItem ) { returnVal = Event . removeListener ( cacheItem [ 0 ] , cacheItem [ 1 ] , cacheItem [ 3 ] ) ; if ( returnVal ) { delete delegates [ index ] [ 2 ] ; delete delegates [ index ] [ 3 ] ; delegates . splice ( index , 1 ) ; } } return returnVal ; }
Removes a delegated event listener.

@method removeDelegate

@param {String|HTMLElement|Array|NodeList} container An id, an element
reference, or a collection of ids and/or elements to remove
the listener from.
@param {String} type The type of event to remove.
@param {Function} fn The method the event invokes.  If fn is
undefined, then all event listeners for the type of event are
removed.
@return {boolean} Returns true if the unbind was successful, false
otherwise.
@static
@for Event
Removes a delegated event listener .