Suppose I have this HTML structure:
<div id="Ancestor">
<div>
<div>
....
<div class="DeepChild"></div>
...
<div id="NotAncestor">
<div>
<div>
....
<div class="DeepChild"></div>
I want to know, when I click on a DeepChild div if it's a descendant of Ancestor.
Something like this:
$('.DeepChild').click(function () {
if (whichcondition?? === true) { IsFromAncestor = true; }
});