Tagged: x
-
AuthorPosts
-
December 4, 2016 at 8:23 pm #1281021
oakidoakiParticipantHi! An annoyance: When I using a mobile combined with a One Page menu the menu doesn’t close on id-links (#). It hides the section that is navigated to, and is confusing for some users.
Any way simple way to do this?
I think the menu should close / roll up on any click.
Example site http://rosegull.no – hit for instance “Om”
December 4, 2016 at 8:36 pm #1281036
NicoModeratorHi There,
Thanks for writing in! To fix your issue, please add the following jQuery script via Appearance > Customize > Custom > Javascript
jQuery(document).ready(function($){ $('.menu-item a').click(function(){ $('.x-nav-wrap.mobile').removeClass('in'); }); });Don’t forget to clear your browser’s cache after adding the code.
Let us know how this goes!
Thanks.
December 5, 2016 at 3:06 pm #1282131
oakidoakiParticipantThanks, it works when I’m using a PC and mouse click. But on the mobile I can’t see any change.
I’m using Chrome in incognito to avoid the cache.Is there another event than “click” that should be used?
December 6, 2016 at 12:23 am #1282641
LelyModeratorHello There,
Please update the code to this:
jQuery(document).ready(function($){ $('.menu-item a, .x-navbar .x-nav-wrap.mobile a').on('touchend click', function(){ $('.x-nav-wrap.mobile').removeClass('in'); }); });Hope this helps.
December 6, 2016 at 3:15 pm #1283658
oakidoakiParticipantIt did it, thank you 🙂
December 7, 2016 at 12:13 am #1284118
Paul RModeratorYou’re welcome! 🙂
December 9, 2016 at 7:04 pm #1288000
oakidoakiParticipantActually, this got it working like it should for me:
jQuery(document).ready(function($){ $('#menu-one-page-menu-1 .menu-item.menu-item-type-custom a').on('touchend click', function(){ $('.x-nav-wrap.mobile').removeClass('in'); }); });December 9, 2016 at 11:13 pm #1288123
RadModeratorGlad to hear that and thanks for sharing 😉
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1281021 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
