Menu icon Foundation
Top-bar jumps to top when clicked on mobile

I have placed a logo above my top bar and used the provided syntax for getting it to stick to the top once you reach it when scrolling down.

<div class="contain-to-grid sticky">
  <nav class="top-bar" data-topbar>
    ...
  </nav>
</div>

However if I click on the menu icon, to expand it, before I have scrolled down(and reached the sticky point) it jumps to the top of the screen.

I would like for the menu to stay put, even if I expand it, until I scroll down and reach it. (yes I already have "scrolltop:false")

Help would be appriciated!

top-bar

I have placed a logo above my top bar and used the provided syntax for getting it to stick to the top once you reach it when scrolling down.

<div class="contain-to-grid sticky">
  <nav class="top-bar" data-topbar>
    ...
  </nav>
</div>

However if I click on the menu icon, to expand it, before I have scrolled down(and reached the sticky point) it jumps to the top of the screen.

I would like for the menu to stay put, even if I expand it, until I scroll down and reach it. (yes I already have "scrolltop:false")

Help would be appriciated!

Wing-Hou Chan almost 4 years ago

Hi Josef,

I had the same problem as well:

http://foundation.zurb.com/forum/posts/881-page-jumps-to-top-on-top-bar-hamburger-icon-click

Try the solution that Alok has given. If it's helpful give him a thumbs up! I haven't tried the solution myself yet, as that project is on hold at the moment, but I believe it should work. If you have any feedback on Alok's solution post it in the thread I started, I would love to see if it works or if there are any problems.