Created
March 12, 2013 23:54
-
-
Save luckyshot/5148188 to your computer and use it in GitHub Desktop.
jQuery - Attach event to parent delegating to child targets
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
$('#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