Showing and hiding submenu with jQuery

The quick fix for showing and hiding a submen is easily done with jQuery. I could have gone on the internet to look for some CSS solution, but this is working nicely, so..

I have a menu consisting of an Unordered list with and some div's wich need to be shown if there is a click on the menu item:

function ShowMenu(id) {
    $("#content").empty();
    HideSubMenu();
    var menuid = "#" + id; 
    $(menuid).toggle('slow');
    HideIndicator();
}

function HideSubMenu() {
    ShowIndicator();
    var i = $("#SubMenu div").each(function(i){
        var menu = "#" + $(this).attr('id');
        if ($(menu).css('display') == 'block') {
            $(menu).toggle('slow');
        }
    });
    HideIndicator()
}

function ShowIndicator() {
    $("#indicator").show();
}

function HideIndicator() {
    $("#indicator").hide();
}

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!