-
AuthorPosts
-
May 11, 2015 at 11:36 am #270902
I’m trying to set up a one page with anchors. I think I’ve done so but on the mobile menu, when selecting a menu item, the menu doesn’t close automatically. I’ve added some javascript to the customizer that I found on another support post but it isn’t working …
May 11, 2015 at 2:56 pm #271071Hi There,
Thanks for writing in. As we checked your site, it is working well.
Would you mind sharing us your admin credential so we could take a closer look on your setup and share us also the added script that you added.
Don’t forget to set it as private reply.
Thanks.
May 12, 2015 at 6:01 am #271520It seems to be working for me now also … It must have been a cache issue.
May 12, 2015 at 7:57 am #271619Great. Glad you’ve sorted it out.
June 1, 2015 at 4:19 pm #289075So I’ve checked this on the iphone 6 and it does not close when I click on a menu item. Any suggestions?
June 2, 2015 at 5:27 am #289617Hi there,
Please add the following CSS under Customize -> Custom -> JavaScript :
(function($){ $('.x-navbar .x-nav-wrap.mobile a').click(function(){ $('.x-nav-wrap.mobile').toggleClass('in').css('height', 0); $('.x-btn-navbar').toggleClass('collapsed'); }); });
Hope it helps.
June 2, 2015 at 9:44 am #289873That didn’t seem to work … the menu will not close when it is clicked automatically on the iphone. When I resize on the browser to mobile, it won’t work either.
June 3, 2015 at 12:30 am #290575Hi there,
I’m sorry, please try this code :
(function($){ $('.x-navbar .x-nav-wrap.mobile a').click(function(){ $('.x-nav-wrap.mobile').toggleClass('in').css('height', 0); $('.x-btn-navbar').toggleClass('collapsed'); }); })(jQuery);
This one should work.
Thanks.
June 5, 2015 at 9:04 am #293536Hi, this still is not working on an iphone 6 … It works fine when I resize the browser on a desktop computer (Windows), but when testing it on an iphone 6, the menu does not close.
June 6, 2015 at 1:40 am #294178Hi Dave,
It’s a bug betweem IOS and our theme, which I already forwarded as bug before. It seems like there is something that blocks the click event on IOS.
I even performed the simple test,
jQuery('.x-navbar .x-nav-wrap.mobile a').on('click',function(){ console.log('clicked');});
That should output ‘clicked’, but it’s not.
Please don’t use fixed positioning for your navigation for now.
Thanks!
January 19, 2016 at 12:20 am #752397Hey there …is there any solution on this? We are running into the same issue.
j
January 19, 2016 at 12:53 am #752432Hi J,
You can try this code
(function($){ $('.x-navbar .x-nav-wrap.mobile a').on( "click touchend", function(){ $('.x-nav-wrap.mobile').toggleClass('in').css('height', 0); $('.x-btn-navbar').toggleClass('collapsed'); }); })(jQuery);
Hope that helps.
-
AuthorPosts