Sticky element on top of the browser

I want navbar position to be originally lower on screen and stick to the top of the browser when scrolled up, like this example http://jsfiddle.net/jpXjH/6/.

I tried to do that with Hype but it’s works basically only once and after that the element sticks permanently on the top of the browser. sticky navbar sample.zip (49.7 KB)

this is it!
stickyNav.hype.zip (101,2 KB)

Thank you for your answer, but your solution don’t work in the phone the menu disappear when scrolling and appear when scrolling stops https://www.dropbox.com/s/c4cxehk32uofxx7/sticky%20navbar.mp4?dl=0

Hi,

I have this working and added the code to another menu on another scene.

I use id menu2 and duplicate the code.

It works fine on normal transitions but when I swap it ‘kills’ the sticky.

Any ideas please.

Also is it possible to make this work across all menus with out to add the event to each one. ?

Cheers

Steve Warby

The Menu must be a persistent symbol

LIVE PREVIEW

template

disregard … found it …(sorry) thanks

Is it possible to make the navigation menu always at the bottom of the viewport, regardless of the mobile gadget and its viewport. When scrolling, it moved to the very top and then again when scrolling down to the same position at the bottom of the viewport.

Possible with code - sure, but this seems like it would be horribly confusing..? Why not just keep it at a specific spot if it will always be visible?