Submit your widget

Simple JQuery Accordion Collapsing menu

Created 13 years ago   Views 51716   downloads 12367    Author n/a
Simple JQuery Accordion Collapsing menu
View DemoDownload
Share |

This is a simple Accordion collapsing menu done in JQuery. Links with subitems under them will expand the submenu when clicked. Items that don't have subitems are normal links.. The menu initialises with the first submenu expanded.



     function initMenu() {
    $('#menu ul').hide();
    $('#menu ul:first').show();
    $('#menu li a').click(
    function() {
    var checkElement = $(this).next();
    if(('ul')) && (':visible'))) {
    return false;
   if(('ul')) && (!':visible'))) {
   $('#menu ul:visible').slideUp('normal');
   return false;
   $(document).ready(function() {initMenu();});