Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created September 18, 2008 01:48
Show Gist options
  • Save aviflombaum/11354 to your computer and use it in GitHub Desktop.
Save aviflombaum/11354 to your computer and use it in GitHub Desktop.
// The bestest event-delegator ever!
jQuery.fn.delegate = function(eType, r) {
return this.bind(eType, function(e) {var $t = $(e.target); for(var s in r) if($t.is(s)) return r[s].apply(this, arguments)})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment