In this example I use scrollMonitor to fix a menu to the top of the page once it normally would leave the viewport. As an extra I also use CSS3 transition to animate the menu into a new appearance.
MenuSee the Pen by CreativePunch (@CreativePunch) on CodePen.