Helping with my portfolio: Add scrollspy on it

Helping with my portfolio: Add scrollspy on it
0

#1

Dear all,

I am trying to add scrollspy to my portfolioMyPortfolio. Following the guide of Bootstrap-Javascript Javascript-Bootstrap I tried two ways:

  1. data-target="#topbar"
  2. data-target=".navbar"

But both don’t work.

I am really confused. Did I use something wrong?

P.S libiaries are included, body css is configured.

Thanks for answering!


#2

Are you using CodePen? Is there a way you could post your code?


#3

Yes, I am using Codepen. The link is here Portfolio.

What interesting is that, when I create a new Pen and paste the code into it, the scrollspy works.

This is the new Pen having the same code there. New Pen


#4

In the working version, you loaded jQuery before bootstrap, and vice versa for the non-working version.


#5

Thank you very much! Now I see that jQuery should be loaded before bootstrap so that it works!