• Hi,

    I’m having issues with the jQuery Accordion that I am using atm.

    The script is here

    backticks
    function initMenus() {
    $(‘ul.side_navigation ul’).hide();

    $.each($(‘ul.side_navigation .current_page_item’).parents(‘ul’),function () {
    $(this).show();
    });

    $(‘ul.side_navigation li a’).click(
    function() {
    var checkElement = $(this).next();
    var parent = this.parentNode.parentNode.id;

    if($(‘#’ + parent).hasClass(‘noaccordion’)) {
    $(this).next().slideToggle(‘normal’);
    return false;
    }
    if((checkElement.is(‘ul’)) && (checkElement.is(‘:visible’))) {
    if($(‘#’ + parent).hasClass(‘collapsible’)) {
    $(‘#’ + parent + ‘ ul:visible’).slideUp(‘normal’);
    }
    return false;
    }
    if((checkElement.is(‘ul’)) && (!checkElement.is(‘:visible’))) {
    $(‘#’ + parent + ‘ ul:visible’).slideUp(‘normal’);
    checkElement.slideDown(‘normal’);
    return false;
    }
    }
    );
    }
    $(document).ready(function() {initMenus();});
    backticks

    The problem is that I have a horizontal navigation menu and a vertical side menu. What I am wanting to achieve is, when the user selects the parent link from the navigation menu, the child links will drop down from the side menu..

    I can only get the menu to expand if the child from the top navigation or side navigation is selected.

  • The topic ‘Help with jQuery Accordion’ is closed to new replies.