diff options
-rw-r--r-- | finder_menu.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/finder_menu.js b/finder_menu.js index e21f5d2..aedc960 100644 --- a/finder_menu.js +++ b/finder_menu.js @@ -85,6 +85,9 @@ function ul2finder() cssjs('remove',this,parentClass);
cssjs('add',this,openClass);
cssjs('add',this.parentNode.getElementsByTagName('ul')[0],showClass);
+
+ // TODO: check and fix
+ // unset window.finderNode for all other nodes that aren't children
children = this.childNodes;
refs = document.getElementById('finder').getElementsByTagName('a');
for (var i=0;i<refs.length;i++) {
@@ -106,7 +109,11 @@ function ul2finder() // and hide the current nested list
cssjs('add',this,parentClass);
cssjs('remove',this,openClass);
- cssjs('remove',this.parentNode.getElementsByTagName('ul')[0],showClass);
+ children = this.parentNode.getElementsByTagName('ul');
+ // TODO: check and fix
+ for(var j=0;j<children.lenght;j++) {
+ cssjs('remove',children[j],showClass);
+ }
}
// don't follow the real HREF of the link
|