Skip to content

Instantly share code, notes, and snippets.

@luckyshot
Created March 12, 2013 23:54
Show Gist options
  • Select an option

  • Save luckyshot/5148188 to your computer and use it in GitHub Desktop.

Select an option

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