Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Accordion menu goes into footer

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41270
    Ricods
    Participant

    Hello. I have a problem. I’ve made a accordion menu in sidebar using wp_nav_menu. Everything works great as long as the content has a lot of info. But when there is no text or is a little, after clicking “Szkoła” (second from top) the menu is going in to the footer. I would like the footer to go down when the menu is opening. Can you help me?
    the jquery script for menu:

    $(document).ready( function($) {

    // This hides all the sub menus on page load
    $(‘#mb-nav ul.sub-menu’).hide();
    // This makes sure that all the sub menus are open when applicable
    $(‘#mb-nav li.current-menu-item’).children().show();
    // This keeps the nav open to the item that you are navigating to.
    $(‘#mb-nav li.current-menu-item’).parents().show();

    $(‘#mb-nav ul li a’).click(
    function() {
    var checkElement = $(this).next();
    if((checkElement.is(‘ul’)) && (checkElement.is(‘:visible’))) {
    return false;
    }
    if((checkElement.is(‘ul’)) && (!checkElement.is(‘:visible’))) {
    $(this).parent().siblings(“li:has(ul)”).find(“ul”).slideUp(‘normal’);
    $(‘#mb-nav ul ul li ul:visible’).slideUp(‘normal’);
    checkElement.slideDown(‘normal’);
    return false;
    }
    }
    );
    $(‘#mb-nav ul ul li a’).click(
    function() {
    var checkElement = $(this).next();
    if((checkElement.is(‘ul’)) && (checkElement.is(‘:visible’))) {
    return false;
    }
    if((checkElement.is(‘ul’)) && (!checkElement.is(‘:visible’))) {
    $(‘#mb-nav ul ul’).slideUp(‘normal’);
    $(‘#mb-nav ul ul li ul:visible’).slideUp(‘normal’);
    checkElement.slideDown(‘normal’);
    return false;
    }
    }
    );

    });

    #116832
    Ricods
    Participant

    O and the page adress:

    #116834
    Watson90
    Member

    Add some bottom margin to your secondary div. Like so;

    #secondary {
    margin-bottom: 30px; /* Or whatever value you feel comfortable with */
    }

    #116838
    Ricods
    Participant

    got it. The problem was wp-equal-colums, but I’ve also added the bottom margin. Thanks:)

    #116845
    Watson90
    Member

    Really? Your whole website seems to have lost its layout?

    #116846
    Watson90
    Member

    Ahh, it’s all fine now, nevermind.

    #116847
    Ricods
    Participant

    I’m working on @media screen, and I had a @media screen and (min-width:480px), and that has changed the layout. I’m having a little problem with getting the media screen to work in 480×320 and not to interfere with other resolutions.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.