Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1349112

    Hello,

    We’re currently using a regular hamburger menu on desktop with “Sidebar Flyout Menu (Minimal)” as Menu Overlay Style.

    With “Display submenu items on click” we have an issue with the menu, that opened sub-menus doesn’t close when another one is opened, so we’re currently using hover instead of click as not-hover will close the sub-menu.

    However there is an issue with the 0.3s (ease?) transition animation. If we accidentally hover over a second/two menu items when targeting a sub-menu item with cursor, the entire menu starts to animate up and down indefinitely.

    I can’t seem to get rid of the transition, even when targeting everything with “transition: none !important”. It seems that the menu items gets appended a class called “.av-show-submenu” which transitions px height etc. when the sub-menu goes from display:none to display:block.
    Would love to get some help on this one.

    Link to website in private.

    • This topic was modified 2 years, 3 months ago by tekniskakari.
    #1349148

    Hey tekniskakari,

    Could you try updating the theme to the latest version (4.9.2.1) to see if that helps please? https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update.

    Best regards,
    Rikard

    #1349167

    This little snippet is only for 1st level submenu !
    It will show then only one submenu open at a time – on click another submenu item the other will close. Is it that what you like to achieve?
    _____________
    Just let the setting to show submenu on click – and insert this to your child-theme functions.php:

    function only_one_submenu_open(){
    ?>
    <script>
    (function($) {
    $(document).ready(function(){ 
      $('body').on( 'click touch', '.av-active-burger-items > a', function () {
        $(this).parent('li').siblings().removeClass('av-show-submenu');
        $(this).parent('li').siblings().find('ul').slideUp( "fast");
      });
      $('body').on( 'click touch', '.av-active-burger-items .av-width-submenu > a', function () {
        $(this).closest('.sub-menu').siblings().find('li').removeClass('av-show-submenu');
        $(this).closest('.sub-menu').siblings().find('ul').slideUp( "fast");
      });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'only_one_submenu_open');
    #1349363

    Thanks Guenni for making the jQuery function, it works when it’s set to click. Appreciated :)

    #1349372

    Hi,

    Great, I’m glad that @guenni007 could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.