• Resolved coroleu

    (@coroleu)


    Hi, im using a template with your own “scroll-to” option but doesnt like me. For this reason im use your plugin for some menu items. The problem is in mobile, when i click on “ordena en linea” menu item, the scroll works fine but menu doesnt close and if i try to close manually the scroll come back to top of the page. Im sorry for my bad english.
    Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author malihu

    (@malihu)

    Hi,

    The plugin cannot close a menu from a different script automatically. You’ll need to add some custom javascript in your theme/template.

    For example, try adding the script below in your theme’s footer.php just before the closing body tag (</body>):

    <script>
    (function($){
      $(window).on("load",function(){
        $(".mobile-sidebar .menu-item ._mPS2id-h").on("click",function(){
          $(".mfp-close").click();
        });
      });
    })(jQuery);
    </script>

    This should do what you need.

    Let me know if it works

    Thread Starter coroleu

    (@coroleu)

    Hi Malihu, thanks for your answer but doesnt work.

    Plugin Author malihu

    (@malihu)

    Move the script below wp_footer() function in a new line just before the closing body tag. Is this possible?

    If not, try changing the script to:

    <script>
    (function($){
      $(window).on("load",function(){
        $(".mobile-sidebar .menu-item").on("click","._mPS2id-h",function(){
          $(".mfp-close").click();
        });
      });
    })(jQuery);
    </script>
    Thread Starter coroleu

    (@coroleu)

    Yes, you right. I put the code manually in my child theme just before close the body tag and works great. Thanks a lot.

    Plugin Author malihu

    (@malihu)

    Cool ☺️
    You’re welcome

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Doesnt close menu’ is closed to new replies.