[Resolved] Add an "appearing animation" to the back-to-top button

Home Forums Support [Resolved] Add an "appearing animation" to the back-to-top button

Home Forums Support Add an "appearing animation" to the back-to-top button

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #238768
    Christian

    Hi Tom,

    I just added the back to top button to my site and have already themed it a bit more “material” πŸ˜‰
    Now the only thing I miss is some sort of animation to not just make the button “pop in” whenever I scroll down enough.
    Is there a way to add this using CSS ? I really would like to not add another plugin…

    PS: I hope the beer/coffee was good and thank you again for everything,
    Christian

    #238777
    Tom
    Lead Developer
    Lead Developer

    Good question!

    The way I currently have it set up doesn’t allow for transitions.

    I realize that’s not ideal, so I just adjusted it to allow them.

    You can grab the latest code here: https://github.com/tomusborne/GeneratePress

    The files you want to replace are:
    https://github.com/tomusborne/GeneratePress/blob/master/inc/template-tags.php
    https://github.com/tomusborne/GeneratePress/blob/master/js/back-to-top.min.js

    There should be a small transition now by default, but you can make it more prominent like this:

    .generate-back-to-top {
        transition: opacity 1s ease, visibility 1s ease;
    }

    Thanks for helping me improve the code πŸ™‚

    #238930
    Christian

    Hi Tom,

    I just had time to implement the changes, everything is working great, thanks !

    And please, don’t thank me, I have to thank you, as much as every other user of this great heme should be thankful for the theme itself and your precious support. This is rare nowadays.

    Have a good time and thanks again,
    Christian

    #239050
    Tom
    Lead Developer
    Lead Developer

    Perfect πŸ™‚

    Glad I was able to help!

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