Archived topic
Smooth Scroll Troubles...
11 replies · Started by Jacob on October 6, 2018
I've added this code to the page:
<h3>Test Jump Link</h3>
I have also enabled Smooth Scroll within Customize > General .
I have the link "https://new.smartdogowners.com/supplements/#posts" within my nav bar, under the item Health and Safety > Dog Supplements , however I'm not seeing any smooth scroll.
Any thoughts / tips?
Thanks!
Woops, looks like my html rendered. Updated code below :)
<h3><a class="smooth-scroll" id="posts" >Test Jump Link</a></h3>
Hi there,
Looks like your missing the link in the <a> tag?
Try this format here:
https://generatepress.com/forums/topic/smooth-scroll-not-getting-applied/#post-632889
Let me know if this helps :)
Hi Leo,
No dice, here's the updated code:
<h3><a href="#posts" class="smooth-scroll"></a>Test Jump Link</h3>
It looks like using the format above, the jump link no longer works in addition to no smooth scroll.
Can you take a look?
https://new.smartdogowners.com/supplements/
I'm linking to: https://new.smartdogowners.com/supplements/#posts within the Nav item - Health and Safety > Dog Supplements
Not quite in the format like Tom's suggestion.
You need to close the <a> after the link text Test Jump Link.
Hi Leo, thanks for the quick response. Updated, no change on my end. Any other ideas?
Greetings,
Hope you don't mind me jumping in to assist. When using anchors, there needs to be a "target" for your anchor link to scroll to. I couldn't find this at your link.
Take this for example:
<p><a href="#posts" class="smooth-scroll">Anchor me down</a></p>
<p>Some text here</p>
<a name="posts"></a><h2>New Section</h2>
On the third line is the target which your link should jump to, or in this case smooth scroll to.
Hope that helps? :)
Hi Three Point, no worries and thank you!
Let's say I wanted to have people smooth scroll to the text "Anchor me down", how would I go about that?
As is, that doesn't work on my end, unfortunately.
Try this method instead:
https://generatepress.com/forums/topic/one-pager/#post-155986
Then make sure you use the full link for the Custom link URL, with smooth-scroll added as a custom class.
Hey Leo,
I feel like we are going in circles.
I've tried all the above, the most recent recommendation
<a class="smooth-scroll" name="posts">Test Jump Link</a>
With the nav item pointing to the full URL
<a href="https://new.smartdogowners.com/supplements/#posts">Dog Supplements</a>
Isn't working for me.
I also tried adding back in the href, as seen below:
a class="smooth-scroll" href="#posts" name="posts">Test Jump Link</a>
That isn't working as well.
Can you type out exactly what I need to add?
Sorry - I just noticed that you are jumping from one page to another.
Unfortuantely this isn't supported by by our smooth scroll script currently:
https://generatepress.com/forums/topic/smooth-scroll-from-one-page-to-another/#post-643464
My apologies to put you in a circle!