dy {
  position: relative;
}
{% endhighlight %}
{% highlight html %}
<body data-spy="scroll" data-target=".navbar-example">
  ...
  <div class="navbar-example">
    <ul class="nav nav-tabs" role="tablist">
      ...
    </ul>
  </div>
  ...
</body>
{% endhighlight %}

  <h3>Via JavaScript</h3>
  <p>After adding <code>position: relative;</code> in your CSS, call the scrollspy via JavaScript:</p>
{% highlight js %}
$('body').scrollspy({ target: '.navbar-example' })
{% endhighlight %}


  <h3 id="scrollspy-met