Skip to main content
added 6 characters in body
Source Link

This works on a higher z-indexz-index than the event parameter mentioned in above answers:

$("#mydiv li").click(function(){ ClickedElement = this.id; alert(ClickedElement); }); 

This way you will always get the idid of the (in this example lili) element. Also when clicked on a child element of the parent..

This works on a higher z-index than the event parameter mentioned in above answers:

$("#mydiv li").click(function(){ ClickedElement = this.id; alert(ClickedElement); }); 

This way you will always get the id of the (in this example li) element. Also when clicked on a child element of the parent..

This works on a higher z-index than the event parameter mentioned in above answers:

$("#mydiv li").click(function(){ ClickedElement = this.id; alert(ClickedElement); }); 

This way you will always get the id of the (in this example li) element. Also when clicked on a child element of the parent..

Source Link

This works on a higher z-index than the event parameter mentioned in above answers:

$("#mydiv li").click(function(){ ClickedElement = this.id; alert(ClickedElement); }); 

This way you will always get the id of the (in this example li) element. Also when clicked on a child element of the parent..