| Welcome to Webforumz.com. |
|
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
|
|
|
Apr 29th, 2008, 11:17
|
#2 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
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 
__________________
|
|
|
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!
|
|
|
Apr 29th, 2008, 20:12
|
#4 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
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 
__________________
|
|
|
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!
|
|
|
May 1st, 2008, 09:56
|
#6 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
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!
__________________
|
|
|
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
|
|
|
May 1st, 2008, 16:43
|
#8 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
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!
__________________
|
|
|
May 1st, 2008, 18:05
|
#9 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
Re: Suggestions needed for multi level vertical menu...
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)
|
|
|
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
|
|
|
May 2nd, 2008, 10:44
|
#11 (permalink)
|
|
Chief Moderator
Join Date: Oct 2007
Location: UK
Posts: 715
|
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 
__________________
|
|
|
| Thread Tools |
|
|
| 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
HTML code is Off
|
|
|
|
|
|