Ok, here's something to try out
The run-down of the attached script;
- Look for a <ul> with ID list
- Search for any nested lists and add class hidden
- Search for any links within list
- If the next element (sibling) of a link is a <ul>, assign an onclick function
When a link that has been assigned the
onclick function is clicked, this the process;
- Find the sibling list
- Remove class hidden
- Alter the onclick function to reverse the process next time the link is clicked
Let me know how you get on!
Tested on Windows: IE6, IE7, FF2 & Opera 9
(zip contains
list.htm and
expanding-menu.js)