Manualy change from desktop to mobile menu
-
“Is there an easy way to switch the menu from desktop to mobile and vice versa dynamically, using triggers, for example, when the user scrolls to a specific point on the page? I’m using the Observer API to detect user scroll, but I don’t see any method to switch the menu dynamically other than by modifying this CSS:
@media (max-width: 768px) {
.main-navigation ul, .gen-sidebar-nav, .main-navigation:not(.slideout-navigation):not(.toggled) .main-nav > ul, .has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.navigation-search):not(.main-nav) {
display: none;
}
}.main-navigation .main-nav>ul {
display: flex
;
flex-wrap: wrap;
align-items: center;
}.mobile-menu-control-wrapper {
display: none;
margin-left: auto;
align-items: center;
}@media (max-width: 768px) {
.has-inline-mobile-toggle .mobile-menu-control-wrapper {
display: flex
;
flex-wrap: wrap;
}
}@media (max-width: 768px) {
.has-inline-mobile-toggle .mobile-menu-control-wrapper {
display: flex
;
flex-wrap: wrap;
}
}But`s seems kinda workaround way. Would love if you can help me with this.
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.