Skip to content

Instantly share code, notes, and snippets.

@luckyshot
Created March 12, 2013 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luckyshot/5148188 to your computer and use it in GitHub Desktop.
Save luckyshot/5148188 to your computer and use it in GitHub Desktop.
jQuery - Attach event to parent delegating to child targets
$('#parent').click(function(e){
var target = $(e.target); // the child that fired the original click
// do stuff here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment