Let's say we've got a menu similar to this:
Here we have a simple unordered list, which we can transform into a simple collapsing/expanding menu with just a few lines of jQuery. Inside $(document).ready(), we could add the following:
$("#menu ul").hide();
$("#menu li a").click(function(){
$(this).next().toggle();
}
And we're done! The first line hides all lists inside the



