Site logo

[Resolved] Container fade-in on scroll

Home Forums Support [Resolved] Container fade-in on scroll

Home Forums Support Container fade-in on scroll

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2464476
    Drew

    Trying to find a straightforward solution for applying a fade-in effect to a container on scroll and what I’ve found in the support board so far applies to entire page content fade in or a container fade in from page load.

    Any suggestions? And is this coming as a default function to GenerateBlocks?

    #2464983
    David
    Staff
    Customer Support

    Hi there,

    there is this plugin:

    https://wordpress.org/plugins/animated-blocks/

    Will it be something we add to GB? A: possibly a future Pro feature.

    #2465461
    Drew

    Roger that and thanks for the recommendation David 🙏

    #2465820
    David
    Staff
    Customer Support

    You’re welcome

    #2490532
    Drew

    David, a follow-up here I think will be useful for anyone else finding the thread is how do I go about disabling the animation via that plugin on mobile? There are no settings options and the plugin author does not maintain a support thread in the WP plugin repo.

    Likewise, there is no straightforward CSS to disable.

    I could duplicate each parent container and set those to display across queries but that seems like a LOT of work and unnecessary code to load.

    #2490915
    Fernando
    Customer Support

    Hi Drew,

    I’m not sure if this will work, but you can try dequeuing the animation scripts of this plugin.

    Try adding this snippet:

    add_action( 'wp_enqueue_scripts', 'cu_remove_animation_scripts', 50 );
    function cu_remove_animation_scripts() {
        if(!is_admin() && is_wp_mobile()){
            wp_dequeue_script( 'ab-animate' );
            wp_dequeue_script( 'ab-animated-block' );
        }
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    #2491770
    Drew

    Thanks Fernado, I will give that a shot.

    #2492140
    Fernando
    Customer Support

    You’re welcome, Drew!

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