aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finder_menu.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/finder_menu.js b/finder_menu.js
index 378e7d6..951ac46 100644
--- a/finder_menu.js
+++ b/finder_menu.js
@@ -29,7 +29,6 @@ function ul2finder()
}
// loop through all links of inside finder
- window.finderOpened = [];
lis=document.getElementById('finder').getElementsByTagName('li');
for(i=0;i<lis.length;i++)
{
@@ -42,7 +41,6 @@ function ul2finder()
newa.href='#';
newa.appendChild(document.createTextNode(lis[i].firstChild.nodeValue));
lis[i].replaceChild(newa,lis[i].firstChild);
- window.finderOpened[i] = false;
// otherwise apply the parent class
cssjs('add',newa,parentClass);
@@ -74,14 +72,13 @@ function ul2finder()
}
}
- if (window.finderOpened[i] == false || window.finderOpened[i] == null) {
- window.finderOpened[i] = true;
+ if (cssjs('check',this,parentClass)) {
+ alert('yes');
// 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 {
- window.finderOpened[i] = false;
// change the current link from open to parent
cssjs('swap',this,openClass,parentClass);
// hide the current nested list