Archived topic
Smooth Scrolling Issues
5 replies · Started by Brian on July 31, 2018
Hi!
I am making a blog site at /localhost (my bad, my boss doesn't want my work on the internet yet) and I am trying to make a downward pointing chevron to place on the bottom of a hero image that allows users to click it in order to scroll down to the post content. I have everything looking good, the smooth-scrolling is checked and the code for my chevron is:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
And I used the "addfilter" function from here to try and really slow down the transition.
Everything seems to be working as intended with the exception of three issues:
1) Contrary to the documentation, the smooth-scroll doesn't sense my sticky-navigation (I have set up an invisible anchor point above my target to work around this).
2) The link only works once per page-load. Clicking on the chevron again does nothing, though it can still be used to open the link in a new tab.
3) The addfilter duration is having no effect on the duration of the animation.
Oddly enough, if I use the chevron to open a link in a new tab, the destination page has none of these issues, so I know what it should look like when successful. I apologize that I can't post a link to the site, but does there seem to be an apparent reason smooth scrolling isn't working properly for me?
Also, I am adding the addfilter code through the code snippets plugin by Shea Bunge.
I should also probably mention that I am structuring all of my content with the free version of Elementor plus Anywhere Elementor Pro.
Hey Brian,
This kind of thing is super hard to debug without seeing it unfortunately. Is there a way the site can be temporarily migrated to a private server?
We made some improvements to the smooth scroll functionality in GPP 1.7, which is available for testing: https://generatepress.com/gp-premium-1-7/
Ah, darn. Well, I have never migrated from localhost to a private server before but I wouldn't mind giving it a try. Any preferred methods of doing so quickly?
It's pretty painless using a tool like Duplicator: https://en-ca.wordpress.org/plugins/duplicator/