Assuming I have this HTML structure:
<ul class='menu'>
<li>
<div></div>
<div>
<div></div>
<div>
<a href="#">Text</a>
</div>
</div>
</li>
</ul>
How would I, using jQuery, go about accessing “Text”? I know I need to use something like $(‘a’).text(), but my hangup lies in not knowing how to get down to that level when I only know the class of the UL at the top. I’ve tried using variations of .children() but I’m not quite sure how to traverse down that far.
Please assume that I cannot change any of the original HTML markup.
Thanks in advance.
this should handle it
edit: to include code for edited question
here is how to loop through all links in
.menu