aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <s1lv10@uol.com.br>2009-10-01 18:14:43 -0300
committerSilvio <s1lv10@uol.com.br>2009-10-01 18:14:43 -0300
commitcee2b9e1f08e2253fc2e3f781300344d49765453 (patch)
tree18fa279518725457040fb76ac695e7ee31d18b54
parent27a9ddaec51e367fb3271940431e352c30e71603 (diff)
downloadfinder_menu-cee2b9e1f08e2253fc2e3f781300344d49765453.tar.gz
finder_menu-cee2b9e1f08e2253fc2e3f781300344d49765453.tar.bz2
Initial code to hide the menu (8)
-rw-r--r--finder_menu.js9
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