Home › Forums › Jevelin Theme › Main Menu On Desktop
Home › Forums › Jevelin Theme › Main Menu On Desktop
Greetings,
I’m using one of your themes that has a mobile menu on the desktop.
So when people need to navigate, they simply click the icon (three small lines) in the upper right hand corner.
Here is my problem.
Several of my navigation items link to anchor links. When they click on a navigation link … it successfully takes them to the right page/section … however, it doesn’t automatically close the menu.
I would like the menu to close automatically after a person clicks on an anchor link in my navigation.
I implemented the custom plugin colorlib-devilab-plugin that was provided here:
https://support.shufflehound.com/forums/topic/main-menu-on-mobile/#post-47622
However, this only solved the problem for the mobile phone.
I’m needing for the automatic closer of the menu to work on a desktop as well.
Please advise?
Thanks,
Ron
Hi Ron,
I hope you are well today and thank you for your question.
Could you please share your site URL where it’s displaying so that I can help you to achieve it?
Best regards,
Shufflehound team
Please try changing the custom plugin code as below.
function add_custom_scripts(){ ?> <script type="text/javascript"> jQuery(document).ready(function($){ $('.sh-header-mobile-dropdown .sh-nav-mobile li').click(function(){ $('#header-navigation .c-hamburger').trigger('click'); }); }); </script> <?php } add_action('wp_footer', 'add_custom_scripts', 99);