title: Bootstrap 4 - Scrollspy not working
body: <p>I have followed the documentation on how to use Scrollspy in BS4, but it is not working, so how do I solve it?</p>
  
  <p>My body has <code>posistion: relative</code></p>
  
  <p>This is my body tag:</p>
  
  <pre><code>&lt;body data-spy="scroll" data-target=".navbar"&gt;
  </code></pre>
  
  <p>And this is the HTML for the navbar:</p>
  
  <pre><code>&lt;nav class="navbar navbar-toggleable-md navbar-light bg-faded"&gt;
      &lt;button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"&gt;
          &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;div class="container"&gt;
  
          &lt;a class="navbar-brand" href="/"&gt;
              &lt;img src="/images/logo_placeholder.jpg" width="90" height="45" class="d-inline-block align-top" alt=""&gt;
              Jalinen
          &lt;/a&gt;
          &lt;div class="collapse navbar-collapse" id="navbarNav"&gt;
              &lt;ul class="navbar-nav"&gt;
                  &lt;li class="nav-item active"&gt;
                      &lt;a class="nav-link" href="#home"&gt;Home &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Nieuws&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Diensten&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Calamiteiten&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Gallerij&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Contact&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>Why is it not working? </p>
  
  <p>Note:</p>
  
  <p>Nothing works atm.</p>
  
  <p>The navbar doesn't even stick to the top of the page.</p>