Could someone show me how to loop through the anchor tags within a div and find the next sibling?
I have this so far.
var menu = document.getElementById('menu');
var links = menu.getElementsByTagName('a');
How do I loop through the links? Can I use .nextSibling
to find if the next sibling is a div?