Hi,
I have a tree menu on my site.
The problem is the when I click on one of the closed menu points, the opened one doesnt close.
[CODE]if (firstChild.className.search(/open/) >= 0){
tg.className = tg.className.replace(‘open’, ‘closed’);
firstChild.className = firstChild.className.replace(‘open’, ‘closed’);
} else {
tg.className = tg.className.replace(‘closed’, ‘open’);
firstChild.className = firstChild.className.replace(‘closed’, ‘open’);
}[/CODE]
The first child is the menu point that should open or close.
Since I actualy have only two points that open as a tree menu, I would need to change the div class of the one that is already opened.
Any thoughts are appreciated.