I am trying to get this to warn only that the div has clicked, and also notifies me of the div element pressed, and then the div container. when I click on the third div, I would like it to only warn the "third". thanks for the help.
<div id="first"> <div id="second"> <div id="third"> third div </div> second div </div> first div </div> $("div").click(function() { alert(this.id); });
dusty source share