Java collapsable menu

Hello,
I have created a menu that lists the tables in use, and I want to be able to have these callapsable.
My ApplicationDelegate.php contains this:
I would like somehow to be able to click on the 'Sections' text and have it show or hide the list of tables below.
I'm out of my depth with javascript, so any help would be great.
Many thanks, Tom
I have created a menu that lists the tables in use, and I want to be able to have these callapsable.
My ApplicationDelegate.php contains this:
- Code: Select all
function block__before_left_column(){
$app =& Dataface_Application::getInstance();
$tables =& $app->_conf['_tables'];
echo "<h2>Sections</h2>";
foreach ( $tables as $name=>$label){
echo "<li><ul><a href="."index.php?-table=".$name.">".$label."</a></ul></li>
";
}
}
I would like somehow to be able to click on the 'Sections' text and have it show or hide the list of tables below.
I'm out of my depth with javascript, so any help would be great.
Many thanks, Tom