I am using data-scrollto for inside page navigation:
[Go to Block
...
... When it is used on the same page it works perfectly.
But, when I am using the following code in index.html:
Go to Block at Devices html](#)With the code above in index.html it
- opens devices.html instantly at the anchor for like .3s
- then jumps to the top
- and then scrolls back to the anchor
I have alerady added the following code to the index page to smooth it a little bit:
jQuery(document).ready( function(){
setTimeout(function() {
if (location.hash) {
window.scrollTo(0, 0);
}
}, 1);
});
With this at least it jumps to the top when loading not back and forth.
Scrolling would not be too bad if it scrolled instantly, but it takes almost 2sec to start the scrolldown animation when opened from an external link which is way too much.
So to sum up, I want to use scrolling when staying on the same page (using data-scrollto), but when opened from an external page (using href anchor) I just want to jump to the anchor.
OR
Somehow make the scrolling animation to start faster when the href anchor link is clicked from an external page.
I tried to find the solution for both in functions.js but I was not successful.
Could you please help me?
Thank you in advance
