diff options
author | Silvio <s1lv10@uol.com.br> | 2009-10-01 12:59:54 -0300 |
---|---|---|
committer | Silvio <s1lv10@uol.com.br> | 2009-10-01 12:59:54 -0300 |
commit | 45710acc0b955219681d57b4b44b92c6b02930c9 (patch) | |
tree | 175eea1f93d6a2812562254b892bfa6edc531a73 | |
parent | 9ef5cf804397086c2b1c964d5d785cd884d2d8dd (diff) | |
download | finder_menu-45710acc0b955219681d57b4b44b92c6b02930c9.tar.gz finder_menu-45710acc0b955219681d57b4b44b92c6b02930c9.tar.bz2 |
Initial code to hide the menu (5)
-rw-r--r-- | finder_menu.js | 7 |
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
|