From 27a9ddaec51e367fb3271940431e352c30e71603 Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 1 Oct 2009 18:03:12 -0300 Subject: Initial code to hide the menu (7) --- finder_menu.js | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/finder_menu.js b/finder_menu.js index 376ddd5..e21f5d2 100644 --- a/finder_menu.js +++ b/finder_menu.js @@ -12,6 +12,7 @@ function ul2finder() var showClass='shown'; var hideClass='hidden'; var openClass='open'; + window.finderOpened = []; // check if our finder list exists, if not, stop all activities finder=document.getElementById('finder'); @@ -44,8 +45,13 @@ function ul2finder() // otherwise apply the parent class cssjs('add',newa,parentClass); + // setup the link + ref = lis[i].getElementsByTagName('a')[0]; + ref.id = 'finder[' + i + ']'; + window.finderOpened[ref.id] = false; + // if the user clicks on the link - lis[i].getElementsByTagName('a')[0].onclick=function() + ref.onclick=function() { // loop through all lists inside finder for(var i=0;i