Sticky navigation starting at special point

Oh Alex - come on - You give up too easy!

The following is not technical. You already had all the examples You needed - just cut & paste.

In the “onScroll” section I added the following two lines to my previous demo project (_JHSv7):

window.onscroll = function() {	
	var scrollAmount = scrollY;
	hypeDocument.goToTimeInTimelineNamed(scrollAmount * 0.006, 'Animate1');

You’ve seen this code before in this thread.


In the attached Hype Demo (_JHSv8) I also added a timeline called “Animate1” to match the new code.

This timeline rotates the target element & then changes its color.

Simple!

Now I’m done - this time I mean it! :sunglasses:

Scrolling - movable FixedMenu_JHSv8.hype.zip (24.2 KB)

3 Likes