diff options
author | Silvio <s1lv10@uol.com.br> | 2009-10-03 16:58:55 -0300 |
---|---|---|
committer | Silvio <s1lv10@uol.com.br> | 2009-10-03 16:58:55 -0300 |
commit | 9ba4334ffa08c8699db4dd8159d54ab70f6fb763 (patch) | |
tree | 181d5a570266cf9c49c7f630b856638aa1c3bd32 | |
parent | ac3d9e1062ebdd1addd7e68ed45674832709ce38 (diff) | |
download | finder_menu-9ba4334ffa08c8699db4dd8159d54ab70f6fb763.tar.gz finder_menu-9ba4334ffa08c8699db4dd8159d54ab70f6fb763.tar.bz2 |
Almost working version (2)
-rw-r--r-- | finder_menu.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/finder_menu.js b/finder_menu.js index ca40c91..2b20d68 100644 --- a/finder_menu.js +++ b/finder_menu.js @@ -55,29 +55,20 @@ function ul2finder() ref.onclick=function()
{
// loop through all lists inside finder
+ ul = this.parentNode.getElementsByTagName('ul')[0];
for(var i=0;i<uls.length;i++)
{
// check if it's connected to this link
var found=false;
- /*if (isparent(this.parentNode.getElementsByTagName('ul')[0], uls[i]) ||
- isparent(uls[i],this.parentNode.getElementsByTagName('ul')[0])) {
+ if (isparent(ul, uls[i]) || isparent(uls[i],ul)) {
found=true;
- }*/
- for(j=0;j<uls[i].getElementsByTagName('ul').length;j++)
- {
- if(uls[i].getElementsByTagName('ul')[j] ==
- this.parentNode.getElementsByTagName('ul')[0])
- {
- found=true;
- break;
- }
}
// hide elements
if(!found || window.finderOpened[this.id] == true)
{
ref = uls[i].parentNode.getElementsByTagName('a')[0];
- if (ref != this) {
+ if (ref != this && !isparent(uls[i],ul)) {
window.finderOpened[ref.id] = false;
ref.innerHTML = false;
cssjs('add',uls[i],hideClass);
|