|
Posted by Toby Inkster on 05/15/06 11:02
KiwiBrian wrote:
> Yes please. I loved the first one and would love to see the next one too.
> Thanks
All the code in one file:
http://examples.tobyinkster.co.uk/menu/menu3.strict
This has several advantages over the previous menu:
1. It allows the user to expand several submenus at once.
2. It uses cookies to remember which menus are expanded; so
if the user surfs off to another page and comes back, the menu
is still open where they left it; or if the menu appears on
multiple pages, navigation remains consistant throughout the site.
3. It removes all the horrible class and onclick attributes
scattered throughout the code.
Of course, in real life you don't want to have all that CSS and Javascript
embedded into your HTML file like that -- you want to save them into
external CSS and JS files, like this:
http://examples.tobyinkster.co.uk/menu/menu4
There is still possible room for improvement -- the Javascript could do
with being cleaned up a little for instance; and there is no provision for
an extra level of nested lists.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|