Skip to content

Instantly share code, notes, and snippets.

@rkatic
Created February 22, 2010 03:26
Show Gist options
  • Save rkatic/310747 to your computer and use it in GitHub Desktop.
Save rkatic/310747 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