iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old April 14th, 2008, 08:29 AM   #1
WebForumz Member
 

Join Date: Jan 2006
Location: Belfast
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sing2trees is on a distinguished road
[SOLVED] How to make an expand / collapse menu

Hi,
Am looking for some help (as always!).
I am wanting to create the following

Menu Title 1
- Sub item 1
- Sub item 2
- Sub item 3
- Sub item 4
Menu Title 2
- Sub item 1
- Sub item 2
- Sub item 3
- Sub item 4
Menu Title 3
etc

I would like to have it so the sub items are collapsed on page load. Then when someone clicks on 'Menu Title 1', it shows the sub items for that section. Then if someone clicks on 'Menu Title 2' it collapses the previous sub items, and displays the sub items for menu 2.
Etc

Does someone have some coding I could use - or point me in the direction of a tutorial?

I would be very grateful!

Many thanks

Ben
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 14th, 2008, 08:42 AM   #2
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: How to make an expand / collapse menu

Check out this accordion menu at Dynamic Drive
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 14th, 2008, 08:57 AM   #3
WebForumz Member
 

Join Date: Jan 2006
Location: Belfast
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sing2trees is on a distinguished road
Re: How to make an expand / collapse menu

wow - spot on!
But when adding it to my page - everything is already expanded and it won't collapse

Do you know what could cause this?
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 14th, 2008, 09:12 AM   #4
WebForumz Member
 

Join Date: Jan 2006
Location: Belfast
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sing2trees is on a distinguished road
Re: How to make an expand / collapse menu

the error message I am getting on the status bar is:

Line:22
Char:1
Error: 'ddaccordion' is undefined
Code:0

Any suggestions gratefully welcomed!
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 14th, 2008, 09:16 AM   #5
WebForumz Member
 

Join Date: Jan 2006
Location: Belfast
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 sing2trees is on a distinguished road
Re: How to make an expand / collapse menu

sorry - have figured it out! Didn't have the javascript file and the images in the correct folder!
i am away to hang my head in shame...

Thanks aso186 for the link!!
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to make the PM pop up box? Monie JavaScript 31 November 7th, 2007 05:38 AM
Is it possible to make a simple horizontal css menu without using lists? jonnymorris HTML, XHTML and CSS 9 September 21st, 2007 10:59 AM
How to make a CSS Dropdown menu? Zonglars HTML, XHTML and CSS 3 July 20th, 2007 12:05 PM
Drop Down Expand Menu davva JavaScript 3 October 16th, 2006 03:00 PM
can u make it so that the page loads into the iFrame? (from menu) rachy06 JavaScript 1 April 14th, 2006 01:00 PM


Search Engine Optimization by vBSEO 3.2.0 RC8