diff options
-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);
|