• Resolved 100erbe

    (@100erbe)


    Hello and thank You so much for this wonderful plugin;
    I had problems with my responsive menu because it wouldn’t close on clicking anchor links which I solved following a previous post and adding this code on my functions.php of my child theme:

    add_action('wp_footer','custom_hfe_menu_dropdown_close');
    function custom_hfe_menu_dropdown_close(){
    ?>
             <script type="text/javascript">
                 (function($){
                      $(document).ready(function() {
                      $('.hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__layout-horizontal li').on('click', function() {
                            $('.hfe-nav-menu__toggle').trigger( "click" );
                        });
                      });
                  })(jQuery)
             </script>
    <?php
    }

    My problem now is that the menu closes even when I click on the submenu arrow before I can pick an option. I hope someone can help a newbie like me.
    Thanks in advance

    • This topic was modified 2 years, 10 months ago by 100erbe.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @100erbe

    Kindly try using this code instead:

    (function($){
    			$(document).ready(function() {
    			$('.hfe-layout-expandible li:not(.menu-item-has-children)').on('click', function() {
    				$('.hfe-layout-expandible .hfe-nav-menu__toggle').trigger( "click" );
    			});
    			});
    		})(jQuery)

    Please let us know how it goes.

    Hello @100erbe

    Marking this topic as resolved due to inactivity and assuming the issue is resolved at your end.

    Feel free to reply here or open up a new issue thread if you are still facing this problem.

    Regards,
    Rahul.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘sub menu closes on click (mobile)’ is closed to new replies.