- This topic has 21 replies, 5 voices, and was last updated 2 years, 7 months ago by Tom.
July 6, 2018 at 6:06 am #617185Junior Gong
Is there any way to enable Smooth Scroll for all anchor links on whole site?GeneratePress 2.1.3GP Premium 1.6.2July 6, 2018 at 6:11 am #617192DavidStaffCustomer SupportJuly 6, 2018 at 6:14 am #617196Junior Gong
Example: I am using TOC plugin which generates anchor links automatically.
I cannot add any classes to the anchor links generated.
Therefore my solution is to enable smooth scroll for all linksJuly 6, 2018 at 6:24 am #617205DavidStaffCustomer SupportJuly 6, 2018 at 6:47 am #617222Junior Gong
Is there any way to share the link privately? My client does not want to have links in wordpress related public forums etc..July 6, 2018 at 6:53 am #617237DavidStaffCustomer SupportJuly 6, 2018 at 6:59 am #617250Junior Gong
done!July 6, 2018 at 8:16 am #617384DavidStaffCustomer Support
I am going to check with Tom if there is a way that the smooth-scroll script can work on all
<a>tags within the content. Whilst looking for a decent content filter that could add the class as an alternative.July 6, 2018 at 2:20 pm #617605TomLead DeveloperLead Developer
I’ve just added a new filter to GPP 1.7-beta.2:
That will allow us to initiate smooth scroll on other element classes 🙂July 6, 2018 at 2:29 pm #617609Junior Gong
That is awesome!
Is that gonna work even when an element does not have any class? E.g. just by pointing to an element like in CSS files?July 6, 2018 at 2:36 pm #617612TomLead DeveloperLead DeveloperJuly 8, 2018 at 5:50 am #618497Junior Gong
Thx guys, I appreciate the supportDecember 19, 2018 at 2:42 am #760969Mathias
Awsome! Thank you for sharing this. Smooth-scroll works pretty nice.December 19, 2018 at 4:04 am #761014DavidStaffCustomer Support
Hi Mathias, glad you found it of use. This article may be of interest:March 1, 2019 at 4:51 pm #826087YSK
“generate_smooth_scroll_elements” is a nice filter. I often use this filter.
However, using this filter in IE 11, turning on “Back to Top Button” turns out strange behavior.
When you push the “Back to Top Button”, you will rattle at the beginning and the end.
- You must be logged in to reply to this topic.