You are not logged in.

#1 2005-09-30 07:13:00

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Expanding Javascript Menu Resources?

Hey all, this has nothing to do with Arch, but thought my fellow Archers could probably point me in the right direction.  I'm helping out a friend and haven't done much Javascript stuff at all...I'm looking for a cleaner way to do menu expansion as seen on the site Lafayette Symphony on the left side (clicking on Meet the Symphony for example).  Ignore the SIFR problems for the time being big_smile

The way the menus are currently implemented, the Javascript merely toggles the display property of the CSS for each submenu between <code>display: none;</code> and <code>display: block;</code>.  That works fine, except upon the page loading, you can see a flash of the submenus.

Know of any good Javascript resources for that sort of thing?  Googling for "javascript expanding menu" and other things of the sort didn't quite get what I wanted...thanks!

Offline

#2 2005-09-30 15:37:04

alterkacker
Member
From: Peoples Republic of Boulder
Registered: 2005-01-08
Posts: 52

Re: Expanding Javascript Menu Resources?

The *best* Javascript resource: www.quirksmode.org. Check the Javascript / DHTML / Navigation: Layers page - it shows how to do menus displayed on mouse-over.

Offline

#3 2005-09-30 16:57:20

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Expanding Javascript Menu Resources?

Awesome site man...that should help me out in the future quite a bit!  I think I solved the quirkyness of the menus for now, and looking at the quirksmode site, they did a similar technique for hiding the submenus (but a bit more complex).

Any other links to resources like that would be greatly appreciated!

Offline

#4 2005-09-30 18:21:58

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Expanding Javascript Menu Resources?

ACK! Javascript menus are teh eveel!

You can do it in raw CSS:
http://www.alistapart.com/articles/dropdowns

edit: here's an example:
http://www.htmldog.com/articles/suckerfish/example/

that's all css (unless you use IE then there's some javascript magic to force some pseudo standards compliance)

Offline

#5 2005-10-01 01:03:32

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Expanding Javascript Menu Resources?

Yeah, I know...I'm a big proponent of pure CSS solutions as well, but the menus in this case are actually a bit different than the suckerfish version.  My friend was trying to get this site out to his client by today and had already got most everything all together and knew exactly what he wanted.  I just helped out with some CSS quirks and the menu thing...looking at the code more in depth, I wish I had a few days to really disect it and improve a great number of things, but such is life.  Thanks for the links regardless!

Offline

Board footer

Powered by FluxBB