<div class="nav">Navigation Bar</div>
<div class="box box-1"><p>Section #1</p></div>
<div class="box box-2"><p>Section #2</p></div>
<div class="box box-3"><p>Section #3</p></div>
<div class="box box-4"><p>Section #4</p></div>
<div class="box box-5"><p>Section #5</p></div>
<div class="box box-6"><p>Section #6</p></div>
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-size: 25px;
  font-family: 'Roboto', sans-serif;
}
.nav {
  position: fixed;
  background: #fff;
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  top: 0;
  z-index: 1;
}
.box {
  height: 100vh;
  position: relative;
}
.box p {
  position: absolute;
  top: 100px;
  left: 50px;
}
.box-1 {
  background: #216583;
}
.box-2 {
  background: #63aabc;
}
.box-3 {
  background: #ed3833;
}
.box-4 {
  background: #60204b;
}
.box-5 {
  background: #fff1c1;
}
.box-6 {
  background: #293462;
}
.hidden {
  display: none;
}

// https://github.com/imakewebthings/waypoints

const waypoint = new Waypoint({
  element: document.querySelector('.box-4'),
  handler: function(direction) {
    document.querySelector('.nav').classList.toggle('hidden');
  }
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/noframework.waypoints.min.js