Site logo

[Support request] Adding Simple Animations

Home Forums Support [Support request] Adding Simple Animations

Home Forums Support Adding Simple Animations

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2483366
    Lina

    So I’ve installed sal js, following the instructions from George at https://www.gmitropapas.com/generatepress-tips-and-tricks/generateblocks/scrolling-animation-effects-in-generateblocks-pro/

    Child theme in place, sal files in place… Nothing. To me it seems like it’s not initializing at all, but it could be something I’m doing wrong in WordPress.

    I’m trying to start by animating a simple heading, using these attributes: https://ibb.co/cXbwmMk
    I also tried using the attributes on an entire container, to see if that was the problem, but still, nothing.

    Can anyone tell what I’m doing wrong here? Am I not using the attributes correctly in WordPress? I’m stumped.

    #2483625
    David
    Staff
    Customer Support

    Hi there,

    i do not see the the script files being loaded. How did you add the functions and scripts to the site ?

    #2483669
    Lina

    Here are photos of my site directory, David. I uploaded the files manually through the file manager. As far as I can tell, everything is in place, but something must be missing.

    #2484052
    Fernando
    Customer Support

    Hi Lina,

    To clarify, have you added this function in functions.php as instructed in the link you provided?:

    function gm_enqueue_sal_scripts() {
        wp_enqueue_style( 'sal', get_stylesheet_directory_uri() . '/sal/sal.css' );
        wp_enqueue_script( 'sal', get_stylesheet_directory_uri() . '/sal/sal.js' );
        wp_enqueue_script( 'sal-init', get_stylesheet_directory_uri() . '/sal/sal-init.js', null, null, true );
    }
    add_action( 'wp_enqueue_scripts', 'gm_enqueue_sal_scripts' );
    #2484534
    Lina

    Hi, Fernando. Yes. Definitely. https://imgur.com/VD2BgRM

    #2484558
    David
    Staff
    Customer Support

    Is the Child Theme the active theme ?

    #2484595
    Lina

    Ahhhh! No, it wasn’t. I activated it, but now the heading that I’m testing my first animation on just doesn’t appear.
    Can the custom attributes be applied to a heading block, or can they only be applied to a Container block?

    These are the custom attributes I’m using, just as in George’s tutorial. https://imgur.com/a/Lc1OGvQ

    #2485280
    Fernando
    Customer Support

    Assuming based on the article, it seems that the animation would only work for Containers and not Headline Blocks. Can you try implementing it on a Container and see how it goes?

    #2485764
    Lina

    Okay, I did exactly that and what happened next was that the contents of the entire container disappeared, rather than just the contents of the headline.

    #2486826
    David
    Staff
    Customer Support

    If you right click > inspect the home page to open browser developers tools, in its Console tab there are a few errors.
    The first and main issue is the 404 on this resource: .../wp-content/themes/generatepress_child/sal/sal-init.js

    Can you make sure that the sal-init.js is in the generatepress_child/sal/ folder

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