Skip to content

Instantly share code, notes, and snippets.

@jboesch
Forked from rkatic/gist:310747
Created February 22, 2010 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jboesch/310785 to your computer and use it in GitHub Desktop.
Save jboesch/310785 to your computer and use it in GitHub Desktop.
(function($){
$.each(["live", "die"], function( i, name ) {
var method = $.fn[ name ];
$.fn[ name ] = function( types, data, fn, origSelector ) {
if ( typeof types === "object" && !types.preventDefault ) {
for ( var key in types ) {
method.call( this, key, data, types[key], origSelector );
}
} else {
method.call( this, types, data, fn, origSelector );
}
return this;
};
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment