1
I created an onepage, used anchors and id to do the internal navigation. I need at the end of the site url to be shown which part of the site is being displayed.
Example: When accessing the site this url is loaded: www.meusite.com/index.html
When clicking on the "contact" link, I need this to be increased in the address, thus: www.meusite.com/index.html#contact
I’m using
<a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="#contato">Contato</a>
<section class="page-section contato" id="contato">
It seems to be correct. What problem are you having?
– BrTkCa
I need the id to be added to the page address, but when I click on any anchor link, the site address remains the same. When I click on "contact" the site address is still "domain.com/index.html" and I need it to be "domain.com/index.html#contact"
– LFSMPRO
That’s exactly what I need, but it doesn’t change here.
– LFSMPRO
I managed to resolve, I removed the js-scroll-Trigger class.
– LFSMPRO
Thanks for the help, it’s just a test site to do some tagging through the GTM, the way it’s already capturing what I needed. This js-scroll-trigge is a script to smooth the scrolling of the page, at the moment do not need it, if I change the js.
– LFSMPRO