I am confused on finding an approach to resolve this issue. Consider below html
-
Yes, you can check the event's target
property which will indicate the element that was clicked. You can read more about event properties here.
讨论(0)
-
$("#parent").click(function(e){
console.log(e.target);
});
Demo: http://jsfiddle.net/4bC6K/
讨论(0)
-
Yes, use target:
function(e){
// e.target is the clicked div
}
Example: http://jsfiddle.net/Paulpro/AfA4t/
讨论(0)