Tagged: x
-
AuthorPosts
-
January 16, 2017 at 1:05 am #1331567
khoriginParticipantHi there,
I’m installing the X Theme with WPML and as far as I noticed, the Language Switcher works well on the Desktop Menu (i.e. when clicking the current language, it toggle opens the other available languages). However, when on mobile menu, clicking anywhere on the current language other than on the toggle image will immediately refresh the current page. I’m wondering how to change the default behavior so that it will toggle all the other available languages as well (after all, there’s no use on clicking the link to the same page again)? Thank you!
Cheers!
January 16, 2017 at 1:06 am #1331568
khoriginParticipantThis reply has been marked as private.January 16, 2017 at 1:35 am #1331598
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> Global CSS :
.x-sub-toggle { width: 100%; text-align: right; margin-right: 12px !IMPORTANT; }Hope that helps.
January 20, 2017 at 12:38 am #1337941
khoriginParticipantThanks Christopher, that works. One more question, in the desktop version of the website, once the Translation Toggle is Clicked (which brings the other language options), the Main Translation Menu Selection becomes active (it doesn’t toggle close but rather refresh the page). I’m wondering if it’s possible to set it just to toggle close since it has the potential of messing up the analytics. Thank you.
January 20, 2017 at 12:53 am #1337963
LelyModeratorHi There,
Please try adding the following code on Appearance > Customize > Custom > Edit Global Javascript:
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false; jQuery(document).ready(function($){ if(!isMobile) { $('#menu-item-wpml-ls-home-menu-onepage-id>a').click(function(e) { e.preventDefault(); }); } });Hope this helps.
January 20, 2017 at 1:15 am #1337976
khoriginParticipantHi Lely,
I tried that but it still refreshes the page.
If I click on the “English” menu once, the other languages will show up (this is normal). However, if I click on the “English” menu once more (expecting for the submenu to the other languages to be closed), the page instead goes on refresh (it links to itself). I’m wondering how to force the closing of the submenu if the primary language if clicked again when the submenu is open. Thank you!
Cheers!
January 20, 2017 at 1:49 am #1338013
Paul RModeratorJanuary 20, 2017 at 2:32 am #1338079
khoriginParticipantThis reply has been marked as private.January 20, 2017 at 4:39 am #1338171
Paul RModeratorHi Kevin,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
January 20, 2017 at 4:59 am #1338187
khoriginParticipantThis reply has been marked as private.January 20, 2017 at 1:57 pm #1338788
RadModeratorHi there,
It’s different URL now.
The language loads the corresponding language, it doesn’t scroll. The sub-menu is hidden by default when the page loads, not sure why it needs the expand/collapse functionality upon click.
And all submenu are triggered by hover in desktop.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1331567 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
