I know how to get the value of an immediate parents class,id..etc.. But how do you get the ID value of a parent that is not immediate, and not the grandest-parent, but of a known class name? I know you would think just to get the ID value based on the class name. But I have a lot of dynamically loaded content, with the same classes. So I must have the class that is a parent of THIS element. Thanks!
<div class="A">
<div class="B" id="1">
<div class="C">
<div class="D">
<input class="need-ID-of-class-B" value="">
</div>
</div>
</div>
</div>