Skip to content

Instantly share code, notes, and snippets.

@rkatic
Created February 22, 2010 03:26
  • Star 0 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
(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