Web Design and Development Forums

[SOLVED] How to make an expand / collapse menu

This is a discussion on "[SOLVED] How to make an expand / collapse menu" within the JavaScript Forum section. This forum, and the thread "[SOLVED] How to make an expand / collapse menu are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > JavaScript Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 14th, 2008, 11:29   #1 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
[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 Apr 14th, 2008, 11:42   #2 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 701
Blog Entries: 2
Send a message via Skype™ to aso186
Re: How to make an expand / collapse menu

Check out this accordion menu at Dynamic Drive
__________________

aso186 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 Apr 14th, 2008, 11:57   #3 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
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 Apr 14th, 2008, 12:12   #4 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
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 Apr 14th, 2008, 12:16   #5 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
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

Thread Tools
Rate This Thread
Rate This Thread:

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 Forum 31 Nov 7th, 2007 08:38
Is it possible to make a simple horizontal css menu without using lists? jonnymorris CSS Forum 9 Sep 21st, 2007 13:59
How to make a CSS Dropdown menu? Zonglars CSS Forum 3 Jul 20th, 2007 15:05
Drop Down Expand Menu davva JavaScript Forum 3 Oct 16th, 2006 18:00
can u make it so that the page loads into the iFrame? (from menu) rachy06 JavaScript Forum 1 Apr 14th, 2006 16:00



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 11:39.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59