Java collapsable menu

Archived from the Xataface Users forum.

tomhousley — Tue Sep 01, 2009 6:18 am

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:

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


shannah — Tue Sep 01, 2009 6:34 pm

JQuery makes this quite easy:

http://visionmasterdesigns.com/tutorial … ng-jquery/