Created
February 22, 2010 03:26
-
-
Save rkatic/310747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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