Neweralearning
-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by Neweralearning
-
-
Hi there! Having some issues with this code which works perfectly fine on desktop but not mobile and I can't figure out why.
The website is French and English, the language button is meant to bring the user back to the same page they are on but in the other language. This code works fine on desktop but on mobile... it brings the user back to the language button set URL slug. Help!
<style>
/* hide items on desktop */
nav.header-nav-list>.header-nav-item:nth-child(odd) {
display: none;
}
/* hide items on mobile */
[data-folder="root"]>div:first-child>div:first-child>div:nth-child(odd) {
display: none !important;
}
</style>
<script>
window.addEventListener('load', function () {
document.querySelectorAll(".header-nav-item--external a").forEach(function(t) {t.href = "/fr/our-services"});
});
</script>
Language toggle working on desktop but not mobile
in Customize with code
Posted
www.neweralearning.ca