Mobile menu button requires second click

I’m using the following code from your support thread to close the mobile menu when a link is clicked

(function($){
  $('.x-navbar .x-nav-wrap.mobile a').on('touchend click', function(){
    $('.x-btn-navbar').click();
  });
})(jQuery);

However, after the link in the mobile menu has been clicked and the menu has closed as desired, the hamburger menu requires two clicks to open again.

Hey @waterbarry,

I’m sorry but we do not support customization issues. The codes we provide here in the forum serve only as a guide. We do not take into account if they will affect certain areas of our theme. With that said, you’d need to consult with a developer to fix customizations issues on your site.

I’d just recommend though that you first go through the troubleshooting procedures mentioned in our Common Issues article here: https://theme.co/docs/common-issues in order to make sure that nothing else is causing the issue like other custom scripts in your site. Another solution is you upgrade to Pro so you can use the Navigation Collapsed element and the feature you need is already built-in.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.