I have an HTML structure lik3
<div>
<ul>
<li>
<div>Other elements</div>
<div>
<ul>
<li class='base-parent parent'>
<div>Base Parent DEFINED</div>
<ul>
<li class="parent parent-level-1">
<div class="child">Inner Parent Level 1</div>
<ul>
<li class="parent parent-level-2">
<div class="child">Inner Parent Level 2</div>
<ul>
<li class="parent parent-level-3">
<div class="child">Innermost child 1</div>
</li>
<li class="parent parent-level-3">
<div class="child">Innermost child 2</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
</div>
Though I can find the closest parent LI of div.child, I need to know how I can find the first parent LI element of class div.child under li.base-parent excluding base-parent.