diff options
author | Silvio <s1lv10@uol.com.br> | 2009-10-03 18:42:35 -0300 |
---|---|---|
committer | Silvio <s1lv10@uol.com.br> | 2009-10-03 18:42:35 -0300 |
commit | f8a4e7d146d572e0e4eb049f062fb9279c567351 (patch) | |
tree | c4ce6be6b9c1c50024378c22a9f0a36ad3d6e1c7 | |
parent | 5c862970eaeb02b858281b56491de5b679990de3 (diff) | |
download | finder_menu-f8a4e7d146d572e0e4eb049f062fb9279c567351.tar.gz finder_menu-f8a4e7d146d572e0e4eb049f062fb9279c567351.tar.bz2 |
Code cleanup
-rw-r--r-- | finder_menu.js | 7 |
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
|