I have been looking for a solution for this matter, and I have seen several posts with the same inquiry under the library, some with no answer and some others with answers from random people then started to wondering if is there a solution in general, because when looking at the repository example and at the code itself, cannot say or compare because they don't links to other pages inside the landing page.
So the problem is, I have a website where I am using globally the locomotive scroll, however only the "homepage" have those anchor points sections, and for the whole website I have 2 menus pointing always to the homepage sections, the difference between those menus are, in one I am using the "#section-one" anchor point in the href(homepage menu) and for the rest of the pages I am using the entire link + the anchor point so something like "http://www.mywebsite.com/#section-one":
So homepage link on menu:
<a href="#section1" class="link w-inline-block reveal__line"
data-scroll-to>
<div class="relative-marquee-wrapper">
<p class="paragraph-xl">Cases</p>
<div class="superscript">
<div><span>0</span><span>1</span></div>
</div>
</div>
</a>
Inner pages menu
<a href="http://www.mywebsite.com/#section1" class="link w-inline-block reveal__line">
<div class="relative-marquee-wrapper">
<p class="paragraph-xl">Cases</p>
<div class="superscript">
<div><span>0</span><span>1</span></div>
</div>
</div>
</a>
So with the first one is no issue at all, but the second one(internal menu), when trying to link the homepage sections from the internal pages. The behaviour I have is, when I click the link, I am redirected to the homepage, but i cannot see any element in the homepage, then I have to scroll for a bit, to being able to see the section(with the anchor point), and I only see that particular section, the rest of the elements disappear or are not showing. So in order to see them, I have to reload the page again.
In the console, I have no warnings no errors, so I don't know what is exactly happening, but I realised I am not the only person. The only way I get errors is if I attach the "data-scroll-to" property to the href but by doing that, doesn't do anything anymore, and the error I get is:
Failed to execute 'querySelector' on 'Document': 'http://mywebsite.com/#section-one' is not a valid selector.
And I think this should be normal, because is looking for the selector inside the same page, but obviously, doesn't exist. Not sure what I am doing wrong, or why is behaving like this, if actually is normal, if actually this should work only with LPs.
Thank you in advance for any help.
