title: Is it possible to implement a scrollspy with only javascript?
body: <p>I want to implement a scroll-spy to change the active state of buttons in the navigation bar. There are examples that use jQuery but I want to implement it with pure javascript. Is it possible? If it is possible, can you provide me an example code?  </p>
  
  <p>Edit: What I mean with pure js is not using any external libraries. Sorry for misrepresenting.</p>