Collapsible Menu

m7 / 2008-12-30 13:35:44   

I would love to add this collapsible menu to my site:

http://www.ladolcevitae.co.uk

And found the code to add but don't know where to add it, please can someone help---thanks,

Mark

---------This is the code----

// First we hide all exhibitis $("#menu ul li.section-title").nextAll().hide();

// then the active exhibit is showed
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
});

// This is the toggle function
// first it hides all sections
$("#menu ul li.section-title").click(function()
{
$("#menu ul li.section-title").nextAll().hide();
$(this).nextAll().slideToggle("fast");
});

masood / 2008-12-30 16:18:35   

Check out this thread from the 'Useful Threads' link:

Expanding menus code and advice

Then scroll down till you get to rcairn's explanation. He also has instructions on his site.

Hope this helps.

m7 / 2008-12-30 16:55:23   

hi masood,

thanks for the reply , yes I checked out rcaim's tutorial etc., this is using a slightly different method to the code that Vaska did. I got rcaim's to work (partially), only one of the menu titles became collapsible and couldn't work out how to make the others work.
I may have another go.
Do like your site by the way, the menu's work v.well, guess you used rcaims info.

All the best,

Mark

Vaska A / 2008-12-30 19:21:55   

I had posted that I took that out of commission. For now...it will return later souped up and ready for action.

m7 / 2008-12-31 08:43:06   

Thanks for the info Vaska, look forward to your souped up version.

This thread has been closed, thank you.