1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

DU Header nested sub menus Style (

Discussion in 'Basic Support Forum' started by Nirre, Jan 27, 2020.

  1. Nirre

    Nirre New Member
    Divi Ultimate Header Plugin

    Hi

    How would I go about nesting the submenu items on mobile so you have to click the little x or + to reveal the sub-menus?

    I have tried this but it does not seem to work.

    <style type="text/css">
    header .et_mobile_menu .menu-item-has-children > a { background-color: transparent; position: relative; }
    header .et_mobile_menu .menu-item-has-children > a:after { font-family: 'ETmodules'; text-align: center; speak: none; font-weight: normal; font-variant: normal; text-transform: none; -webkit-font-smoothing: antialiased; position: absolute; }
    header .et_mobile_menu .menu-item-has-children > a:after { font-size: 16px; content: '\4c'; top: 13px; right: 10px; }
    header .et_mobile_menu .menu-item-has-children.visible > a:after { content: '\4d'; }
    header .et_mobile_menu ul.sub-menu { display: none !important; visibility: hidden !important; transition: all 1.5s ease-in-out;}
    header .et_mobile_menu .visible > ul.sub-menu { display: block !important; visibility: visible !important; }
    </style>

    <script type="text/javascript">
    (function($) {

    function setup_collapsible_submenus() {
    var $menu = $('header .et_mobile_menu'),
    top_level_link = 'header .et_mobile_menu .menu-item-has-children > a';

    $menu.find('a').each(function() {
    $(this).off('click');

    if ( $(this).is(top_level_link) ) {
    $(this).attr('href', '#');
    }

    if ( ! $(this).siblings('.sub-menu').length ) {
    $(this).on('click', function(event) {
    $(this).parents('.mobile_nav').trigger('click');
    });
    } else {
    $(this).on('click', function(event) {
    event.preventDefault();
    $(this).parent().toggleClass('visible');
    });
    }
    });
    }

    $(window).load(function() {
    setTimeout(function() {
    setup_collapsible_submenus();
    }, 700);
    });
    })(jQuery);
    </script>
     
    1. PRO MEMBER PERKS Divi Powerful Child Theme - Power up your Divi sites with tons of new functionalities & premade elements:Learn More
  2. Nirre

    Nirre New Member
    Divi Ultimate Header Plugin

    Works perfect for the mobile menu, but the dropdown on the desktop does not work?
     
    1. PRO MEMBER PERKS Divi.Help Layout AI Generator - Try the power of AI to generate a custom Divi layout for you:Try Now
  3. Nirre

    Nirre New Member
    Divi Ultimate Header Plugin

    Okay so I have tested it and I seem to have found the problem, as soon as you change the border settings and make the corners rounded the dropdown disappears from the desktop view. It is starting to look like there is way too many compatibility issues with the new Divi theme builder and your plugin at this stage for it to be of use without bugs and issues.
     
  4. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Try to go to the Menu module settings > Advanced > Visibility > Horizontal Overflow & Vertical Overflow and set them to be Visible.
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Industrial' Divi layout for all Pro members:View Demo