My HTML looks like this:
<li class="li-top"><a class="top sub" href=#>Blah</a> .... </li>
What I am trying to do is to select the anchor tag, so I can change the color of the text (“Blah”). But here’s the catch: I am using closest() because I am starting from a descendant of that li tag:
$(this).closest('li.li-top');
How do I get that anchor tag from this starting point? I tried next(), each(), children(), etc. I can’t get it. Thanks.
If you’re starting from one of the children, you might try:
I often go this way to find ‘cousins once removed’ in the DOM.