Does not navigate to other page if scrollTo is added
-
There seems to be an issue when trying to link to an anchor on another page.
For example if I’m on the /aboutus page and there is a custom link on the menu with the url “www.homepage.com” and the scrollTo field of the shiftNav is “#contact” for example, nothing happens.If the url is “www.homepage.com/#contact” and the scrollTo field of shiftNav is “#contact”, nothing happens again. In fact I’ve tried various alterations of the url field with “#contact” in the scrollTo parameter. Nothing happens.
The only time it navigates to the new page is when I put “/#contact” or “www.homepage.com/#contact” but this throws a jQuery error because I see in the code you are basically searching for the anchor link by using $(scrollTo) in which case “#contact” is valid but “/#contact” is not valid.
The jQuery also causes the scrolling to lose it’s smoothness (i.e. it navigates abruptly even when on the same page) and breaks and interrupts other javascript code on the page.
In the end there does not seem to be a way to use the scrollTo feature without changing the code.The page I need help with: [log in to see the link]
- The topic ‘Does not navigate to other page if scrollTo is added’ is closed to new replies.