Forum Moderators: open
Here is what I have so far:
function getMenuName(obj)
{
var objName;
objName = "mydiv" + obj.childNodes[0].nodeValue;
objShow = document.getElementById(objName)
objShow.style.visibility = "visible"
}
This works great to make the desired div visible, but now I need to turn off the others. How do I loop through the page and...
1 - Collect all divs that begin with "myDiv"
2 - Change visibilty to hidden.
Thanks in advance.
var collection = YAHOO.util.Dom.getElementsByClassName('blah');
and "collection" will contain a collection of any object of class 'blah'.