Hierarchical Menus with the Underrated style.display Object
Subject:   improvements...
Date:   2003-05-02 10:58:56
From:   anonymous2
* first off, see the first comment for how to get the code working; the code itself is the same, the difference in the implementation is where exactly you put your link information

* secondly, this should work just fine under OS X-- Javascript is Javascript, and CSS is CSS, just make sure you have the latest browser

* third: the hideAll function isn't necessary. if you just want all of the sublinks to be hidden off the bat, first put them in a class such that display="none", so they are hidden initially.

then, change the showLevel function to the following:
function showLevel(_levelId, _imgId){
var thisLevel = document.getElementById(_levelId);
var thisImg = document.getElementById(_imgId);
if( != "block"){ = "block";
thisImg.src = minusImg.src;
hideLevel(_levelId, _imgId);

(the only change is in the "if" condition)

comments &c. :

1 to 2 of 2
  1. improvements...
    2007-01-30 18:44:09  chembo [View]

  2. improvements...
    2004-01-01 08:33:46  anonymous2 [View]

1 to 2 of 2