Jump to content

Archived

This topic is now archived and is closed to further replies.

josh1178

Custom Scroll Spy Nav ID name

Recommended Posts

josh1178    10
josh1178

Currently if I want to deep link to a scroll spy tab, it looks like this. 

/#spyID1

 

Is there some way to customize this without having to add some custom anchors into the html? 

Thanks

Share this post


Link to post
Share on other sites
josh1178    10
josh1178

If you want to deeplink to a section of your page using a url like: http:myshop#Video it doesn't work, even though video is the title.

 

Instead, we must use /#spyID3 if you want to link to that section of the page. 

 

It's a bit messy/ugly to have spyID3 instead of the title. I can build an anchor into the section with the proper name, but it's an extra bit of code that I'd rather not have to use if there is another way to just use the title as an anchor. 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

You do not use anchors with Scroll Spy, the documentation shows you how to use Scroll Spy. In order to populate the menu, you need to add some HTML along with the title attribute.

 

If you want to target a specific section using Scroll Spy, then you will need to use HTML above the section you wish to target. The simplest way would be to follow the instructions on the Scroll Spy documentation I linked you and add that HTML to a MediaBox which has been positioned above the section you wish to target.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
josh1178    10
josh1178

Thanks Danny. I already had it working fine, my question was only about anchoring. 

 

I will build custom anchors. Thanks.

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

OK, no problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×