Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #249764
    DonWattz
    Participant

    On the mobile menu drop down for instance on an iPhone, when I click the menu button, with three lines, I see all my main menu items. For the ones that have a sub menu, there is a down down arrow to the right. It seems like the only way to get the sub menu to pop up is to click those arrows. Is there any other way to have the sub menu appear rather than click the double down arrows. It is happening on all my sites but here are a few you can see.

    http://www.krrphotography.com
    http://www.twinbeachplayers.com
    http://www.letsfightback.com

    #250014
    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    To achieve that, you can add this under Custom > CSS in the Customizer.

    
    @media (max-width: 979px){
    body .sub-menu.collapse {
          display:block;
    }
    }
    

    Hope that helps.

    #250316
    DonWattz
    Participant

    Not exactly what I was hoping for. I don’t want all the sub menu items to be open once they click on the menu button.

    #250458
    Zeshan
    Member

    Hi there,

    In that case, you can try one of these two workarounds:

    1: Open only the first dropdown by default when the menu button is clicked (see: http://prntscr.com/6u4p7p). To achieve it, add following JS code under Custom > JavaScript in the Customizer:

    jQuery(document).ready(function($) {
      $('.mobile > ul > .menu-item-has-children .x-sub-toggle').first().click();
    });
    

    2: Open the submenu items when clicking the whole parent link and not just the arrows. To achieve it, add following JS code under Custom > JavaScript in the Customizer:

    // Expand Submenus on Parent Menu Click (for mobiles)
    jQuery(document).ready(function($) {
       var subMenuLink = $('.x-navbar .mobile .x-nav li.menu-item-has-children > a');
     
       subMenuLink.on('click touchstart', function(e) {
         e.preventDefault();
         var $this = $(this);
         $this.find('.x-sub-toggle').off('click touchstart');
         $this.closest('li.menu-item-has-children').toggleClass('x-active');
         $this.siblings('.sub-menu').slideToggle(300);
       });
    });
    

    Hope this helps. 🙂

    Thank you.

    #250462
    DonWattz
    Participant

    The second one is perfect!

    #250468
    Nico
    Moderator

    Glad to hear that!

    Let us know if you need anything else.

    Thanks. Have a great day! 🙂

    #883023
    nolasmiles
    Participant

    This is yet another example of Themeco’s *amazing* support! I never would have imagined receiving customized CSS/JS for such a modest license fee. Blows my mind, 10/10 in my book.

    #883742
    Friech
    Moderator

    Your satisfaction is a great compliment for us.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-249764 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>