Site logo

Archived topic

On mobile: Change menu to button when sticky

5 replies · Started by Anders Nielsen on November 17, 2022

Viewing posts 1–6 of 6

Hi

When using the sticky menu function on mobile.

How can I change the menu to a button for like, "get a call" – when you scroll down.

See video in private section.

Hi Anders,

Let's discuss the first inquiry first.

1. Create a Block Element - Hook. Hook it to menu_bar_items
2. Add a GB Buttons Block.
3. Give the Buttons Block these classes: hide-on-desktop hide-on-tablet
4. Set the Display Rule to show on the Entire site.
5. Add this CSS in Appearance > Customize > Additional CSS:

#mobile-header button.menu-toggle {
    display: none;
}

Let us know how it goes.

Hmm, that removes the entire menu..

It should only be removed when menu is sticky

Hi there

Made a small video, where I go more in details :)

Manage to solve it somehow...

Try adding this:

#sticky-navigation .gb-button-wrapper.gb-button-wrapper-5f0995ad {
    display: block !important;
}
This archived topic is closed to new replies.