Hi,
I am looking for a way to collect all <a>
tags and load then in an array using Mootool 1.1 or pure javascript.
<ul class="menu">
<li>
<ul>
<li><a href="#">Group One</a>
<ul>
<li><a href="#">I want</a></li>
<li><a href="#">I want too</a></li>
</ul>
</li>
<li><a href="#">Group Two</a>
<ul>
<li"><a href="#">I want</a></li>
<li><a href="#">I want too</a></li>
</ul>
</li>
</ul>
</li>
</ul>
Edit Solution:
Thank you all, your responses have helped me find a more precise solution.
Mootools 1.1: @ Oskar
$$("ul.menu ul li ul li a");
@ Dimitar
document.getElements("ul.menu ul li ul li a");
Keep Geeking :)