/* simple jquery accordion menu. html structure to use:
copyright 2007 by marco van hylckama vlieg web: http://www.i-marco.nl/weblog/ email: marco@i-marco.nl free for non-commercial use */ function initmenu() { $('#menu ul').hide(); $('#menu ul').children('.current').parent().show(); //$('#menu ul:first').show(); $('#menu li a').click( function() { var checkelement = $(this).next(); if((checkelement.is('ul')) && (checkelement.is(':visible'))) { return false; } if((checkelement.is('ul')) && (!checkelement.is(':visible'))) { $('#menu ul:visible').slideup('normal'); checkelement.slidedown('normal'); return false; } } ); } $(document).ready(function() {initmenu();});