Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-01-2008, 11:19 PM   PM User | #1
sleidia
New Coder

 
Join Date: Aug 2006
Posts: 50
Thanks: 4
Thanked 0 Times in 0 Posts
sleidia is an unknown quantity at this point
Good flyout menu with Prototype?

Hi guys,

I've spent nearly 3 hours looking for a free stable and crossbrowser vertical fly-out menu with unlimited sublevels.
It would be best if it could be based on prototype.js which I already use on the site.
Also, the categories should be ordered with nested divs instead of a javascript array.

Any good recommendation?

Thanks for the help!
sleidia is offline   Reply With Quote
Old 10-02-2008, 03:08 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Create a basic menu with html and CSS and then try to enhance the look and feel by adding some javascript effects(without losing the basic behaviour)
See http://www.htmldog.com/articles/suckerfish/dropdowns/ to get the basics
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 10-02-2008, 06:45 PM   PM User | #3
sleidia
New Coder

 
Join Date: Aug 2006
Posts: 50
Thanks: 4
Thanked 0 Times in 0 Posts
sleidia is an unknown quantity at this point
Thank you.

But unfortunately, for this one to work, you have to know in advance the number of levels. I need a menu that can have any number of levels because it is built from a database of products categories.

So, it would be better for me to find a system that rely more on Javascript than CSS.
CSS should be used only for the appearance of every menu item.

Thanks again!
sleidia is offline   Reply With Quote
Old 10-02-2008, 08:11 PM   PM User | #4
ohgod
Regular Coder

 
ohgod's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 579
Thanks: 6
Thanked 69 Times in 69 Posts
ohgod is on a distinguished road
look up scriptaculous. it's a control\display library built on top of prototype. it has a TON of toys in it.
ohgod is offline   Reply With Quote
Old 10-03-2008, 02:06 AM   PM User | #5
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
Originally Posted by sleidia View Post
Thank you.

But unfortunately, for this one to work, you have to know in advance the number of levels. I need a menu that can have any number of levels because it is built from a database of products categories.

So, it would be better for me to find a system that rely more on Javascript than CSS.
CSS should be used only for the appearance of every menu item.

Thanks again!
I don't agree! We can dynamically create the html markup for a multi-level menu from the values obtained from the DB, and this would be a nested unordered list(of uls and lis). And the suckerfish CSS will automatically handle any level of items, if we properly write the required rules.
Say, this example have 4 levels by default and the main behaviour of this menu is handled by
Code:
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left:-999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {
left:auto;
}
.
Now, if we have one more level, all that we need to add is
Code:
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul,#nav li.sfhover ul ul ul ul {
left:-999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul,#nav li li li li.sfhover ul {
left:auto;
}
A CSS based based menu ensures a higher level of accessibility, rather than a javascript based one, as people won't see any mouseover effects, if there is no javascript support.
And as a final note, it's hard for normal users to follow a menu beyond a level of 4.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 10-03-2008 at 02:12 AM..
abduraooft is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 09:47 AM.


Advertisement
Log in to turn off these ads.