Re: Looking for a simple collapsible/expandable menu



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

.



Relevant Pages

  • Re: Expanding transarent cell without javascript?
    ... I have developed some code that allows me to create transparent tables, ... however some of these tables need to be able to expand and shrink. ... Is it possible to replicate my expanding cell example without javascript? ... fatal error for xml devices. ...
    (alt.html)
  • Re: problem with mouseover
    ... I am using the below javascript for expand ... "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. ... The first method is far more difficult." ...
    (comp.lang.javascript)
  • Re: problem with mouseover
    ... I am using the below javascript for expand ... ..minus div {display: block;} ...
    (comp.lang.javascript)
  • Re: Expanding transarent cell without javascript?
    ... however some of these tables need to be able to expand and shrink. ... There is no such protocol as "javascript:" even though it is ... Browser sniffing is inherently bad. ...
    (alt.html)
  • Sub-menus in "Start" dont expand
    ... After a fresh installation of Windows XP, when I go to the Start menu, I am ... not able to expand the submenus inside. ... I tried to tweak the themes, and the properties of the Start ...
    (microsoft.public.windowsxp.general)