Sticky element on top of the browser


#1

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)


(strmiska) #2

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


#3

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


(Steve Warby) #4

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


(Freelancer) #5

The Menu must be a persistent symbol

LIVE PREVIEW

template


(Wolfgang Wunderlich) #6

disregard … found it …(sorry) thanks