View Single Post
  #9 (permalink)  
Old May 1st, 2008, 18:05
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: Suggestions needed for multi level vertical menu...

Ok, here's something to try out

The run-down of the attached script;
  1. Look for a <ul> with ID list
  2. Search for any nested lists and add class hidden
  3. Search for any links within list
  4. 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;
  1. Find the sibling list
  2. Remove class hidden
  3. 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)
Attached Files
File Type: zip expanding-menu.zip (1.7 KB, 3 views)
Reply With Quote