Skip to content

Instantly share code, notes, and snippets.

@codenothing
Created July 15, 2010 16:09
Show Gist options
  • Save codenothing/477163 to your computer and use it in GitHub Desktop.
Save codenothing/477163 to your computer and use it in GitHub Desktop.
var rootjQuery = jQuery( document );
jQuery.live = function( selector, type, fn ) {
// Binding object of events to a selector
if ( fn === undefined && typeof type == 'object' ) {
for ( var i in type ) {
rootjQuery.delegate( selector, i, type[ i ] );
}
} else {
// Single event binding
rootjQuery.delegate( selector, type, fn );
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment