0

I have a site that is using bootstrap and ScrollSpy nav to scroll to sections of the page. It all works perfect, however, I want to add a link in my nav to another page on my site. Can this be done?

tvirelli
  • 458
  • 7
  • 22

1 Answers1

2

You need to include anchors on your other page and then add a data-target. For example:

<a href="sample.html#foo" data-target="#foo">Sample</a>
furtive
  • 1,669
  • 2
  • 13
  • 15
  • There's nothing precluding you from adding the anchor/id to the top of your other page. – furtive Oct 23 '12 at 03:22
  • So I am on page index.php with anchor links to #section-1, #section-2, #section-3, #section-4, #section-5 now I want to add a link to user.php. How would I set that up. I did as you stated above but it didn't work. Also, the anchor is on user.php already. – tvirelli Oct 23 '12 at 03:55