hao ramirez hao ramirez - 5 months ago 20
jQuery Question

How to recreate working scrollspy example?

I am trying to recreate a really great scrollspy example from a blog but for some reason... I can't recreate it? I have tried copying and pasting the same code (and the external resources) into

and I can't seem to recreate it. I am really confused as to what might be going on.

I' really appreciate if someone could recreate this issue, or if working source for this project could be reposted.


The external references in jsFiddle didn't list jQuery but it is needed. That was the only addition I had to make to get this functioning. Just add it before you add the bootstrap.js:

<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>

Note that you don't really need jQuery - just change the JS portion of this include to use native JS and it would work without jQuery.

Working recreation: http://codepen.io/staypuftman/pen/PGYJKB