[Tips & Scripts] Mobile Hamburger Navigation Menu

  • 29 February 2016
  • 67 replies
  • 5303 views


Show first post

67 replies

Hi Chris, 
You should be able to upload the .unbounce file into your account without issue. Go ahead and give these steps another try and if that doesn’t work, let us know. 

How do I create a dropdown menu box element?
And I cannot change my ID…

Please help!

Works perfectly, BUT my menu is loading open. Any idea why? Copied the JS code exactly…

USing this on mobile and desktop  - much cleaner than horizontal menu on dekstop

 display: none; has to be in your CSS for the box

Ooooh, that sounds slick AJ!

My menu is not showing anything. Can you take a look to my page please ? 
Thanks !

Is it possible to change the animation to slide from the right instead of toggle?

Super quick question guys - can I do this just on mobile?
I don’t want this for the desktop. I mean, I have a navbar for the desktop… but just don’t want it to stick. However, I need the hamburger menu for mobile.

Is it possible?

I’m looking to do something similar to this where I have a hamburger menu at the top left corner on mobile, but instead of the menu sliding down, I need it to slide in from the left. I want a close button in place of the hamburger when the menu is open to close it (slides back out) and the menu will contain links to iTunes apps instead of anchors on the page.

Is there a way I can modify the CSS/js to do this? I have the viewport width set to 320 currently.

Absolutely Mark. You just need input the box IDs for your mobile nav and none from desktop. They just used the desktop sticky nav as an example of what you can do. You can apply the same script/css for mobile only if you want. Also anything you create for the mobile view can be hidden from the desktop view using the Contents tab on the left.

Great tip @Mark_Standeven!

This is great. Thank you!

One question. When I add Google tag manager to my page, the hamburger menu doesn’t function correctly. Any thoughts on what to do?

How did you solve this? I’m having the same issues.

My menu is not showing up in both mobile and desktop.

Hey I’ve been running this script for a while now. Thought it looked great and all was well but then I just looked and noticed that when I scroll down to another section, the menu is overlapped by content. Meaning that the menu is actually pushed behind text and images. Can anyone help me on this? Ridiculous that this isn’t an inbuilt feature.

Had to pay some developer $$ but I just found that the problem with the script is in the stylesheet.

Here is the fix that was used:
notice that the z-index is now added.

/* Replace "#lp-pom-box-113" with the ID of your menu box and the 'top' value with the pixel height of your navigation bar */ #lp-pom-box-416{ display: none; position: fixed; top: 72px; left: 75%; margin-left: -160px; z-index : 9999; }

I know that digibomb mentioned it but as a coding amateur a z-index meant nothing to me.

And now for the painful part of going into all my past unbounce pages and changing the code 😦

Reply