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..