Skip to content

Instantly share code, notes, and snippets.

@chucktrukk
Forked from rkatic/gist:310747
Created March 6, 2010 07:20
Show Gist options
  • Save chucktrukk/323568 to your computer and use it in GitHub Desktop.
Save chucktrukk/323568 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