Okay
  Public Ticket #3210978
Delaying animations until after AJAX page load
Closed

Comments

  • Simon Parkinson started the conversation

    Hello,

    I'm hoping you might be able to help me. I'm trying to add animation to Gutenburg blocks. Unfortunately, the transitions on any blocks positioned at the top of the page (covered by the preloader) appear to run immediately on page load, rather than after the AJAX preloader. As a result, they're hidden while the transition is running, so look as though they aren't animated. 

    Is there a way to avoid this behaviour, pausing all transitions until the preloader has completed its function?

    Thanks for any help you can provide.

  •  1,798
    Support replied

    Hello Simon,

    without dwelling too much in technicalities, the animations may not work properly when ajax is enabled.

    All the animations require some js initalisation usually in the footer in an enqueued js file

    With ajax header and footer stay the same between ajax page transitions because the content is loaded in a container element. This may be why the animation do not play. On the side note if you disable ajax page transitions do they function properly?

    For this reason we have a CSS class has-animation that is geared to work with AJAX that you can add to your blocks as additional CSS class

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy