aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finder_menu.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/finder_menu.js b/finder_menu.js
index 951ac46..376ddd5 100644
--- a/finder_menu.js
+++ b/finder_menu.js
@@ -72,17 +72,18 @@ function ul2finder()
}
}
- if (cssjs('check',this,parentClass)) {
- alert('yes');
+ if (this.isOpened == false || this.isOpened == null) {
+ this.isOpened = true;
// change the current link from parent to open
cssjs('swap',this,parentClass,openClass);
// show the current nested list
cssjs('add',this.parentNode.getElementsByTagName('ul')[0],showClass);
} else {
+ this.isOpened = false;
// change the current link from open to parent
cssjs('swap',this,openClass,parentClass);
// hide the current nested list
- cssjs('add',this.parentNode.getElementsByTagName('ul')[0],hideClass);
+ cssjs('remove',this.parentNode.getElementsByTagName('ul')[0],showClass);
}
// don't follow the real HREF of the link