1. CYBER MONDAY SALE All Access Pass @ $59 / Lifetime & 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

Solved Collapse submenu items in the mobile menu

Discussion in 'Free Divi Community Forum' started by Jointly, Nov 1, 2019.

  1. Jointly

    Jointly New Member

    Hi,

    Does somebody have a codesnippet for collapsing submenu items in mobile menu? I used to do this in Divi Switch but since Divi 4.0 the option doesn't work anymore.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade card carousel design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

  3. Jointly

    Jointly New Member

    Doesn't work anymore. I made the mobile menu with the new Theme Builder.
     
    1. PRO MEMBER PERKS Custom Color Scheme + Premade Layouts - A perfect combination to boost productivity:Try Now
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    I modified the collapsible mobile menu code to work with the menu built with Divi Theme Builder.

    Try to paste the code below in WP Admin > Divi > Theme Options > Integrations > Add code to the body
    Code:
    Log In or Sign Up to view this code.
     
  5. Jointly

    Jointly New Member

    You are a champ my friend!
     
    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  6. jey

    jey New Member

    Doesn`t Work on DIVI 4
     
  7. Divi.Help

    Divi.Help Administrator
    Staff Member

    The code above is used for Divi Theme Builder custom header.
     
    dalepothen likes this.
    1. PRO MEMBER PERKS Divi Block Pro - Premade team carousel design for your Divi site without using any plugins:View Demo
  8. dalepothen

    dalepothen New Member

    i used that code in but i have small issue
    Admission + this has clickable open and close
    Admission welcome also has it but i need to add same icon to it and also animation to slide up when it is closed

    can you have a look in the site https://ldmschool.com i need in mobile menu only
    thanks
     
  9. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    Log In or Sign Up to view this code.
    I don't think you can do that.
     
    dalepothen likes this.
    1. PRO MEMBER PERKS Divi Block Pro - Premade gallery carousel design for your Divi site without using any plugins:View Demo
  10. dalepothen

    dalepothen New Member

    thanks a ton it worked
    one more request in desktop when hovering over menu can you add a line with hover color with animation
    like in this site https://almostinevitable.com
     
  11. Divi.Help

    Divi.Help Administrator
    Staff Member

    dalepothen likes this.
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Modern & powerful Agency Divi layout pack, featuring team carousel, sliding menu, etc.View Demo
  12. dalepothen

    dalepothen New Member

    ok i will look at it anyway to delay animation of menu its goes of fast of megamenu as so as its out of menu it closes fast
     
  13. brandyarnett

    brandyarnett New Member

    When I use this script, it functions well with the theme builder custom menu except for one glitch. The parent menu item will not link to it's page when clicked. Is there a way for the icon to expand the nest, but clicking on the actual name goes to the parent page?
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade slide in bar design for your Divi site without using any plugins:View Demo
  14. Divi.Help

    Divi.Help Administrator
    Staff Member

  15. conekt

    conekt New Member

    Hi!
    This works well.. can you change the code so that it works for theme builder and the normal divi menĂ¼? In normal Divi menu (+) signs are shown, but doesnt work.
    I use the normal header and a theme builder header on another page to get different menus on different pages.

    Regards Eric
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade rolling text design for your Divi site without using any plugins:View Demo
  16. conekt

    conekt New Member


    Or so that it only works for Theme Builder Header, not for the normal header. Problem is, that the + signs aure shown in the normal header without function. So I cant use another code for standard header because the +signs were also shown in standard header design.
     
  17. Sandra

    Sandra New Member

    Ahh this worked like a charm, thank you so much! That being said, I have another level of navigation that also needs a toggle, any idea how to make that work?
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Agency Divi layout pack featuring modern overlay archive blog layout with hover effects:View Demo
  18. Sandra

    Sandra New Member

    Ahh I also need the navigation items with the toggle to be clickable
     
  19. Divi.Help

    Divi.Help Administrator
    Staff Member

    What about the below code:
    Code:
    Log In or Sign Up to view this code.
     
    Chad Williams likes this.
    1. PRO MEMBER PERKS Divi Block Pro - Premade card carousel design for your Divi site without using any plugins:View Demo
  20. Divi.Help

    Divi.Help Administrator
    Staff Member