Hello,
I know there have been various posts on this topic - and I have read through them BUT I am still having problems trying to customise my expanding menu. (http://www.elliethompson.co.uk)
Basically what I want is for the menu to only expand one section at a time, so for instance if 'Print' is open, and you click 'websites', then the print menu will close and then the website menu will open.
I have seen another thread that uses the following code:
$(document).ready(function()
{
// 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");
});
});
BUT i cant seem to get this to work - I have been trying to place it into my index.php file. I would be really greatful if someone could give me some advice. And sorry if I am repeating topics, but im getting quite desperate now!
thanks.