[Support request] Back to top scroll behaviour

Home Forums Support [Support request] Back to top scroll behaviour

Home Forums Support Back to top scroll behaviour

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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?

    #1158997
    Leo
    Staff
    Customer Support

    Hi there,

    That’s not currently possible unfortunately.

    You would need to find a custom script.

    #1159094
    Matthias

    Okay, that is disappointing! So how can I add a class to the “back-to-top-button” or links?

    #1159137
    Leo
    Staff
    Customer Support
    #1159216
    Matthias

    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

    #1159235
    Leo
    Staff
    Customer Support

    Just 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 🙂

    #1164694
    Matthias

    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?

    #1165559
    Tom
    Lead Developer
    Lead Developer

    Hi 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.