aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finder_menu.js34
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