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

    Hi

    We have a page with many columns, with a fade-in animation assigned to all columns. On this page the visitor has the possibility to jump to different places on the page with anchors. If the visitor jumps to an anchor far down the page, it takes quite a long time until the corresponding content is displayed, because the columns above are animated first. For the visitor, this gives the impression that the corresponding area is empty – which, of course, is not the case.

    I would like to see the visible columns loaded immediately after a jump. Is it possible to adjust this somehow?

    Many thanks

    #1424284

    Hey Jeannette,

    Thank you for the inquiry.

    Have you tried adjusting the animation duration from 1.5s to 0.5s or disabling the animation completely? We can also add a script that automatically triggers the animation when a user hovers over or clicks a specific link

    Please add this code in the functions.php file.

    function av_custom_inline_script()
    {
    
        wp_add_inline_script( 'jquery', 
        "
        (function($) {
            // trigger animation on anchor mouseover
            $(document).ready(function() {
                $('.av-anchor-link').on('mouseover', function() {
                    $('.av-animated-generic.fade-in').each(function() {
                        $(this).addClass('avia_start_delayed_animation');
                    });
                });
            }); 
        })(jQuery);
        "
        );
    }
    add_action( 'wp_enqueue_scripts', 'av_custom_inline_script' );
    

    You will have to add the “av-anchor-link” class name to the anchor link and adjust the animation duration to 0.5s.

    Best regards,
    Ismael

    #1424797

    Hi Ismael

    Thank you very much for your answer.

    Since the problem also occurs when the page is initially called up with a hash in the URL, we have finally decided to implement our own animations.

    Kind regards
    Jeannette

    #1424802

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

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