Scroll effects
Smart, top of page or none
If an ID / hash is given in the page URL it always is scrolled to, no matter, what the setting below
Possible values for scrolltop
Smart scroll – default
scrolltop: "s"
Remember the vertical scroll position of pages already visited and navigate to it. Otherwise scroll to top of page
Always top of page
scrolltop: true
Turned off completely
scrolltop: false
Hello,
Is it possible to scroll to the remembered position only when the user goes there by using the browser’s back/forward button?
In other words always scroll to the top when the user navigates to a page by using a link.
Hi,
There currently is no such feature.
However, you can derive from Ajaxify to achieve it, if that’s an option for you…
Hi again!
Yes, it is set to true and it works perfectly! But when I change pages it slightly goes to the top. I wanna make it instantly, without the animation of going to the top. Is it possible?
Thanks
Hi again!
Thanks for posting back.
The command that is being performed to scroll to the top at the moment is:
setTimeout(() => window.scrollTo(0, 0), 10) //scroll to top with timeout of 10 milliseconds
There are two things, that could be changed:
1) A different command for “jumping” to the top of the page – I don’t know, which one though, do you?
2) Wiping out the delay
Would you be prepared to create your own Ajaxify file? (It can be minified in standard fashion).
If not, please tell me the command you would prefer(instead of “
scrollTo()
“), and I can build a special file for you…Thanks as well!
Hello Again!
I’ve just searched about this on internet and I’ve found the solution.
I just created my own Ajaxify file (the minified version) as you said, then I removed the Timeout and add the propreties “{top: t, behavior: ‘instant’}” to ScrollTop().
now it is like:
let t = t => window.scrollTo({top: t, behavior: ‘instant’})
and it worked perfectly as I intended 🙂
Thanks for help!! Great plugin!
Hi again!
That’s great!
If you would like your site to be listed on my Demos page, please let me know…
Thanks and regards,
Arv
Hello!
Is there any way to turn off the animation of scrolltop and instantly scroll it to the top?
Hi there!
Yes, have you tried specifying:
scrolltop: true
?