Streaming live at 10am (PST)

Menu not opening properly on mobile with custom code

I used the standard Navbar element straight out of webflow, but for some reason the hamburger menu won’t open properly on my iPhone (it looks just fine on mobile view in the designer).
It seems like the menu opens for a little bit but then disappears. Not sure what could be causing this or how to solve it.


Here is my published link: PUBLISHED PROJECT
Here is my public share link: LINK

1 Like

Please share a published link to your project so that we can view the rendered page in a browser. Thanks.

My bad, I’ve edited the original post to include the published project link.

I see what you mean — it’s not working on any device that shows the hamburger.

If you delete the custom code (in the ‘Before Body Tag’) that’s in your Page Settings and publish it, does the issue persist?

1 Like

Huh, strange. I removed the custom code and it did fix it!
However I’d still like to use that piece of code since it creates the main effect that makes the website unique.
Any ideas on a potential compromise?

1 Like

Hmm – @webdev would probably be the expert on that. What effect does that code generate?

The code “tethers” the two sliders together:
When the top slider (dish picture) moves, the bottom slider (dish name) moves along with it.

1 Like

Duplicate the home page with the custom code, publish, and then share that particular link. Need to see the code rendered on the site. I can pop back and take a look later to see if the issue can be isolated.

1 Like

Alternatively - would you be against using interactions? I would imagine if you did a little minor restructuring of the setup, you could link the elements together through interactions and then set it on loop.

Example:

The three images are contained in a div (Overflow: Hidden) and all images except one — like the Caesar Salad — are hidden outside of the div. Using interactions, you can fade and/or move the one image outside of the div and simultaneously bring in the next food item. The same setup could be done with the titles of each recipe/food, and you can essentially link/tether the two elements together this way.

Hopefully that makes sense, but if not, I can try and record a quick screenshare sometime this evening.

EDIT: Actually, it would probably just be easier to rebuild the Navbar without Webflow’s Navbar component – build everything from scratch. I bet your code would work if you did that, and that may be the easier option.

Here are the links:

Version with code
Version without code

The interactions idea is interesting, although I’m not totally sure on how to create a looping slider that moves at time intervals.

I do think rebuilding the Navbar from scratch might be the best/easiest solution. I’ll give it a shot and see if it works!

1 Like

Awesome! Keep us updated - I’d be happy to help you with the slider later today with IX 2.0 if rebuilding the Nav from scratch doesn’t work. :slight_smile: