/* 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 showList() { var checkItemElement = $(this); if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } function initMenu() { $('#menu ul').hide(); /* $('#menu ul:first').show(); */ /* $('#menu ul#profileSub').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();$(init_page_id).show();}); /* if (!$("#profileSub").is(":hidden")) { $("#profileSub").slideUp(); } $("#profileSub").slideToggle(); */