- This topic has 7 replies, 3 voices, and was last updated 2 years, 11 months ago by
Tom.
-
AuthorPosts
-
February 8, 2020 at 8:32 am #1158936
Matthias
I would like to change the scroll back to top behaviour. I have found this code:
add_filter( 'generate_back_to_top_scroll_speed', 'tu_back_to_top_scroll_speed' ); function tu_back_to_top_scroll_speed() { return 400; // milliseconds }
How can I add “ease-in ease-out” behaviour to the scroll?
February 8, 2020 at 9:49 am #1158997Leo
StaffCustomer SupportHi there,
That’s not currently possible unfortunately.
You would need to find a custom script.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 8, 2020 at 12:43 pm #1159094Matthias
Okay, that is disappointing! So how can I add a class to the “back-to-top-button” or links?
February 8, 2020 at 1:47 pm #1159137Leo
StaffCustomer SupportYou can use this filter:
https://docs.generatepress.com/article/generate_back_to_top_output/Example:
https://generatepress.com/forums/topic/additional-class-to-back-to-top-button/#post-960340Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 8, 2020 at 4:22 pm #1159216Matthias
Thanks for the link. The guy has the same problem and had also the same idea like me. I also use the ps2id plugin to smoothly scroll to links with #-tags. Maybe there is a way to delete the click event (event listener) from the button? I think the click function overrides the ps2id‘s function. As the problem seems to be quite common (although I did not find it in your forum), do you think that there is a way out of this issue? I mean, you are the tec-guys with programming skills. It would be nice to get a solution for this.
Thanks and best regards
February 8, 2020 at 5:19 pm #1159235Leo
StaffCustomer SupportJust want to make sure you know that we have built-in smooth scroll script but that doesn’t work for you?
https://docs.generatepress.com/article/smooth-scroll/Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 13, 2020 at 5:23 pm #1164694Matthias
Is it possible to give the button an new href like “#masthead” and additionally is it possible to disable the click event so that ps2id can handle this event?
February 14, 2020 at 9:40 am #1165559Tom
Lead DeveloperLead DeveloperHi there,
Our back to top button wasn’t really built use a custom click event, but it’s not a bad idea to implement in the future.
You’d need to build your own custom back to top button script/HTML/CSS in order to assign a different click event to it.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.