Upfront mobile menu doesn't disappear when clicking on anchor link

Hi there :slight_smile:

When using Upfront Panino, i'm having some issues with the responsive part.

When linking to an anchor the menu does not disappear.
http://cas.dev.ithotline.dk/

Any quickfixes for this?

Thanks in advance...
/Mo

  • Rupok

    Hi IThotline, hope you had a wonderful day.

    Do you mean, in mobile, when you click a menu (Suppose Om Os), it scrolls to that position but doesn't hide the burger menu? Well, this is expected behavior. Please check our demo here: http://demo.upfront.pro/panino/

    But if that is what you want, I mean, if you want to close the menu as soon as any submenu is clicked, then our Upfront Developers can give you best idea. I've already pinged them and I believe they will come up with a workaround very soon.

    Please keep in mind, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a workaround.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi IThotline, hope you had a wonderful day.

    Just got a solution from our developers. You can do this by creating a MU Plugin. For creating a MU Plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    add_action( 'wp_footer', 'hide_burger' );
    function hide_burger() {
        ?>
        <script type="text/javascript">
          jQuery(document).ready(function() {
    		jQuery('.menu-item-object-custom').each(function(){
    		   jQuery(this).click(function(){
    		           jQuery('.wrap_burger_nav_close i').click();
    		   });
    		});
          });
        </script>
        <?php
    }

    For getting more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Please let us know if it doesn't work or if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok