-
- // Handle event unbinding
- // TODO remove
- jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };
-
- // Finally, handle events that only fire once
- // TODO remove
- jQuery.fn["one"+o] = function(f){
- // save cloned reference to this
- var element = jQuery(this);
- var handler = function() {
- // unbind itself when executed
- element.unbind(o, handler);
- element = null;
- // apply original handler with the same arguments
- return f.apply(this, arguments);
- };
- return this.bind(o, handler);
- };