Added an observer that hides a navigation bar on scroll.