hao ramirez hao ramirez - 1 year ago 69
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download