HTML looks something like this:
<li class="divider"> <div> ...(maybe more divs)... <div class="content"> ...(maybe more divs)... <a href="#" class="link">LINK</a> ...
how can I select .content DIV from jQuery function connected by reference? Please note that I have several lists like this, and some of them may not have a div.content, so I want to select this div only if it exists in the current block (li.divider).
I tried with $link.parent().parent().find('content') , but in some cases this does not work, because the number of elements between these two elements can vary ...
source share