From ac3d9e1062ebdd1addd7e68ed45674832709ce38 Mon Sep 17 00:00:00 2001 From: Silvio Date: Sat, 3 Oct 2009 16:34:28 -0300 Subject: Almost working version with new isparent() function --- finder_menu.js | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'finder_menu.js') diff --git a/finder_menu.js b/finder_menu.js index b6b25db..ca40c91 100644 --- a/finder_menu.js +++ b/finder_menu.js @@ -13,6 +13,7 @@ function ul2finder() var hideClass='hidden'; var openClass='open'; window.finderOpened = new Object(); + window.finderPrevious = null; // check if our finder list exists, if not, stop all activities finder=document.getElementById('finder'); @@ -58,6 +59,10 @@ function ul2finder() { // 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])) { + found=true; + }*/ for(j=0;j= 0) { + return true; + } + return false; + } + function isparent_std(par, child) { + if (par == child) { + return true; + } else if (par.hasChildNodes()) { children = par.childNodes; for (var i=0;i