aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finder_menu.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/finder_menu.js b/finder_menu.js
index 7dd276f..2aec3f7 100644
--- a/finder_menu.js
+++ b/finder_menu.js
@@ -57,14 +57,14 @@ function ul2finder()
ref.onclick=function()
{
// loop through all lists inside finder
- ul = this.parentNode.getElementsByTagName('ul')[0];
+ parentUls = this.parentNode.getElementsByTagName('ul');
for(var i=0;i<uls.length;i++)
{
// hide unconnected or closing elements
- if (!connected(ul, uls[i]) || window.finderOpened[this.id] == true)
+ if (!connected(parentUls[0], uls[i]) || window.finderOpened[this.id] == true)
{
ref = uls[i].parentNode.getElementsByTagName('a')[0];
- if (ref != this && !isparent(uls[i],ul)) {
+ if (ref != this && !isparent(uls[i],parentUls[0])) {
window.finderOpened[ref.id] = false;
cssjs('add',uls[i],hideClass);
cssjs('remove',uls[i],showClass);
@@ -74,7 +74,6 @@ function ul2finder()
}
}
- parentUls = this.parentNode.getElementsByTagName('ul');
if (window.finderOpened[this.id] == false) {
window.finderOpened[this.id] = true;
// change the current link from parent to open