diff options
author | Silvio <s1lv10@uol.com.br> | 2009-10-01 11:45:58 -0300 |
---|---|---|
committer | Silvio <s1lv10@uol.com.br> | 2009-10-01 11:45:58 -0300 |
commit | c9f27086831124271f81adcfb4b944f1b2da3129 (patch) | |
tree | 7d3f87d004877c74565b617cc79971fe45ea987b | |
parent | fa86602b433abf5d692e42c3b4b8f527ea3233a7 (diff) | |
download | finder_menu-c9f27086831124271f81adcfb4b944f1b2da3129.tar.gz finder_menu-c9f27086831124271f81adcfb4b944f1b2da3129.tar.bz2 |
Initial code to hide the menu (2)
-rw-r--r-- | finder_menu.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/finder_menu.js b/finder_menu.js index ded419b..a03db53 100644 --- a/finder_menu.js +++ b/finder_menu.js @@ -59,26 +59,26 @@ function ul2finder() if(uls[i].getElementsByTagName('ul')[j] ==
this.parentNode.getElementsByTagName('ul')[0])
{
- found=true;
- break;
+ if (window.finderOpened[i] == false) {
+ window.finderOpened[i] = true;
+ found=true;
+ break;
+ }
}
}
- // and hide all others
- if(!found)
- {
- cssjs('add',uls[i],hideClass)
- cssjs('remove',uls[i],showClass)
- cssjs('remove',uls[i].parentNode.getElementsByTagName('a')[0],openClass)
- if (window.finderOpened[i] == false) {
- window.finderOpened[i] = true;
- cssjs('add',uls[i].parentNode.getElementsByTagName('a')[0],parentClass)
- } else {
- window.finderOpened[i] = false;
- cssjs('remove',uls[i].parentNode.getElementsByTagName('a')[0],parentClass)
- }
- }
- }
+ // and hide all others
+ if(!found)
+ {
+ cssjs('add',uls[i],hideClass);
+ cssjs('remove',uls[i],showClass);
+ cssjs('remove',uls[i].parentNode.getElementsByTagName('a')[0],openClass);
+ cssjs('add',uls[i].parentNode.getElementsByTagName('a')[0],parentClass);
+ } else {
+ window.finderOpened[i] = false;
+ cssjs('remove',uls[i].parentNode.getElementsByTagName('a')[0],parentClass);
+ }
+ }
// change the current link from parent to open
cssjs('swap',this,parentClass,openClass)
// show the current nested list
|