Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1345068
    stephentgw
    Participant

    Hello, I have a project here (http://tomdetitta.com/) where the navbar item “Plays, Books, & Other Writings” has a dropdown menu where you must click the double-arrow-down icon to show the dropdown menu. I can’t figure out how to make it so that clicking the text itself would also bring up the dropdown menu, just in case people miss the arrow icon (on mobile esp). FYI, the navbar item “Plays, Books, & Other Writings” is a dead custom link that I just used as a placeholder for the organization of the navbar.

    Thanks!

    #1345147
    Rahul
    Moderator

    Hi there,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1346404
    stephentgw
    Participant
    This reply has been marked as private.
    #1346499
    Jade
    Moderator

    Hi Stephen,

    This behavior is to make the parent link clickable as well as to open the submenu (upon clicking the arrows). However, if you wish to expand the submenu on clicking the parent menu link as well, you can try to achieve it by adding following code under Custom > JavaScript in the Customizer, though it will disable the parent menu link:

    jQuery(document).ready(function($) {
       var subMenuLink = $('.x-navbar .mobile .x-nav li.menu-item-has-children > a');
    
       subMenuLink.click(function(e) {
         e.preventDefault();
         $(this).siblings('.sub-menu').slideToggle(300);
       });
    });
    

    Thanks!

    #1346668
    stephentgw
    Participant

    Seems to work perfectly, thanks!

    #1346676
    Rahul
    Moderator

    You’re most welcome.

    Feel free to ask us again.

    Thanks.

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