Jump to content

Archived

This topic is now archived and is closed to further replies.

chamois_blanc

Mobile Menu does not disappear after tapping on menu item which is an anchor link

Recommended Posts

chamois_blanc

Hi, the mobile menu that appears on the right hand side does not disappear after tapping on a menu item which is an anchor link. I have to manually tap on the page to make it go away. This seems counter-intuitive. Any solution?

 

Thank you,

Gilles

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Can you provide a link to the site in question please, so we can see the problem first hand.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

Ah, Ok I understand what you mean, I don't think this is a bug, but I can certainly add it to two our tracker as a feature request, as the mobile browser as far as I know, wasn't designed to work with anchor links, you would probably be best off using either UberMenu or the ScrollSpy section.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
chamois_blanc

I tried using UberMenu but I don't see how I can generate a mobile menu that looks and acts the same. I haven't tried ScrollSpy yet. I will take a look. If there is some css or javascript you can give me to try to fix the menu, that would be great.

 

As far as the bug classification, sort of depends on how you look at it. Anchor links are an integrate part of wordpress menus and are used more and more on responsive/mobile websites.

 

Thanks for acknowledging the problem still.

Share this post


Link to post
Share on other sites
chamois_blanc

Looks like this would do:

<script>
  jQuery(document).ready( function($) {
    $(document).on('click','.pl-mobile-menu.show-menu',function(e) {
      if( $(e.target).is('a') ) {
        $(".pl-mobile-menu").removeClass('show-menu');
        $(".site-wrap").removeClass('show-mobile-menu');
      }
    });
  });
</script>
 
Am I on the right track?
 
 

Share this post


Link to post
Share on other sites

  • Similar Content

    • MissT
      By MissT+
      I've set the Mobile / Default Menu setting in the Layout & Nav section of the Platform 5 Pagelines settings to Mobile menu - that is a menu I have created called Mobile that is different to my Main menu.
      When I go to a tablet (ipad) or mobile (android device) and click the hamburger menu icon the menu that appears is still the Main menu and not the one I created called Mobile - am I missing something? Do I need to set the mobile menu somewhere else too?
      WP Version - 4.8.1
      Platform 5 Version - 5.1.7
      MegaNav Section Version - 5.0.17
      Many thanks in advance.
       
    • MissT
      By MissT+
      Is there a way to get the mobile menu to close when you click a menu item that is for an anchor link with the same page?
      Currently on mobiles and ipad the black mobile menu still covers a third or the screen after you have clicked a menu item (that is linking to an anchor link) and it has scrolled to the link / section within the current page. You have to physically click within the page / away from the mobile menu to get the menu and it's black background to disappear.
      Many thanks in advance.
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • Jesper
      By Jesper+
      Hi there
      When creating a classic onepage website with anchor links the mobilemenu does not hide it self when clicked.
      I can see that this issue have been reported before, is there any solution to this? 
      I have the same issue here: http://trasborg.dk/ and here: http://piaggio-ape50.dk/
       
       
       
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
×