Web Design and Development Forums

Suggestions needed for multi level vertical menu...

This is a discussion on "Suggestions needed for multi level vertical menu..." within the JavaScript Forum section. This forum, and the thread "Suggestions needed for multi level vertical 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 29th, 2008, 11:04   #1 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Suggestions needed for multi level vertical menu...

Hi all,

I currently have the vertical menu used here:
http://www.dynamicdrive.com/dynamici...ordionmenu.htm

But the fancy slide open / closed runs very slow on our intranet and therefore am looking for suggestions for something else which still looks good but maybe runs a bit quicker.

I do need it to be multi level:

ie.
Item One
- Sub Item One
- Sub Item Two
- Sub 2 / 1
- Sub 2 / 2
Item Two
- Sub Item One

etc etc

Am looking for a free script - does anyone have any suggestions or recommendations?

Many thanks
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 29th, 2008, 11:17   #2 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Suggestions needed for multi level vertical menu...

Do you need the animation? It's quite easy to write a similar script without the animation and it'll run a whole lot quicker
__________________

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 29th, 2008, 11:40   #3 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Re: Suggestions needed for multi level vertical menu...

Nope - the animation isn't needed. Just need it to expand / collapse upon clicking!
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 29th, 2008, 20:12   #4 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Suggestions needed for multi level vertical menu...

In which case, have you got a link to your page or could you post the HTML code for your menu? I should be able to write up a quick script for it
__________________

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 May 1st, 2008, 07:33   #5 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Re: Suggestions needed for multi level vertical menu...

Hi,

I haven't as yet built the menu. Do you want me to create the menu in list format?

Sorry - am still farily new to this...!

Thanks for your help by the way!
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 May 1st, 2008, 09:56   #6 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Suggestions needed for multi level vertical menu...

If you could build the menu, then it's easier to build a script round it (and make changes if needed )


Yeah, just use an unordered <ul> list!
__________________

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 May 1st, 2008, 15:41   #7 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Re: Suggestions needed for multi level vertical menu...

Thanks again for your help so far. The code is as follows...

HTML: Select all
 <a href="#">Training<p></a>
<li><a href="#">Training Day One</a></li>
<ul>
<li><a href="#">Document One</a></li>
<li><a href="#">Document Two</a></li>
<li><a href="#">Document Three</a></li>
<li><a href="#">Document Four</a></li>
</ul>
<li><a href="#">Training Day Two</a></li>
<ul>
<li><a href="#">Document One</a></li>
<li><a href="#">Document Two</a></li>
<li><a href="#">Document Three</a></li>
</ul>
<li><a href="#">Training Day Three</a></li>
<ul>
<li><a href="#">Document One</a></li>
<li><a href="#">Document Two</a></li>
<li><a href="#">Document Three</a></li>
<li><a href="#">Document Four</a></li>
<li><a href="#">Document Five</a></li>
<li><a href="#">Document Six</a></li>
</ul>
<a href="#">Forms<p></a>
<li><a href="#">Refund</a></li>
<li><a href="#">Suggestion</a></li>
<li><a href="#">Complaint</a></li>
<li><a href="#">Holiday</a></li>
<p>
<a href="#">Useful Info<p></a>
<li><a href="#">Contact Numbers</a></li>
<li><a href="#">Escalations</a></li>
<li><a href="#">Emails</a></li>
<li><a href="#">Regulations</a></li>
<p>
<a href="#">Scripts<p></a>
<li><a href="#">Call Script 1</a></li>
<li><a href="#">Call Script 2</a></li>
<li><a href="#">Call Script 3</a></li>
<li><a href="#">Call Script 4</a></li>
<li><a href="#">Call Script 5</a></li>
<li><a href="#">Call Script 6</a></li>
<li><a href="#">Call Script 7</a></li>
<li><a href="#">Call Script 8</a></li>
<li><a href="#">Call Script 9</a></li>
<li><a href="#">Call Script 10</a></li>

Last edited by aso186; May 1st, 2008 at 16:34. Reason: Use [html] tags
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 May 1st, 2008, 16:43   #8 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Suggestions needed for multi level vertical menu...

Your code is slightly off (we'll get to that later), so let me just check that you want:

Quote:
Training -> Training Day X -> Documents

Forms -> Refund, Suggestion etc.

Useful Info -> Contact numbers, escalations etc.

Scripts -> Script 1, Script 2 etc.

I know that's not *exactly* what you want, it's just to confirm which are links, sub-links and sub-sub-links!
__________________

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 May 1st, 2008, 18:05   #9 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
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, 1 views)
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 May 2nd, 2008, 07:44   #10 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Re: Suggestions needed for multi level vertical menu...

wow - that is fantastic! Many many thanks for that.

One final question.....! Is there anyway that the expanded items (such as training day one etc) and the sub items (document one etc) can be in line with the first list?

ie (when expanded)
Training
Training Day One
Document One
Document Two
Document Three
Document Four
Training Day Two

etc

instead of the large margin on the left that the lists create?

Thanks again!

Last edited by sing2trees; May 2nd, 2008 at 07:45. Reason: typo
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 May 2nd, 2008, 10:44   #11 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: Suggestions needed for multi level vertical menu...

All you need to do is use a spot of CSS

Something like;
Code: Select all
#list li ul {
margin: 0;
padding: 0
}
This basically means any <ul> inside an <li> within #list has zero padding and margin
__________________

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
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
Suggestions Needed.... marketraise int Webforumz Cafe 2 Apr 18th, 2008 18:21
Multi-league and Multi-tiered team schedule overkil6 Website Planning Discussion 2 Apr 15th, 2008 13:51
need to include vertical menu hemanthjava CSS Forum 2 Sep 22nd, 2007 13:10
3 Level Drop Down Menu mrmbarnes CSS Forum 2 Aug 26th, 2007 12:26
CSS Vertical Menu. Can someone help? CoolNeb CSS Forum 3 Jul 16th, 2007 18: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 19:18.

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