-
AuthorPosts
-
October 31, 2023 at 4:04 pm #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
November 1, 2023 at 4:16 am #1424284Hey 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,
IsmaelNovember 6, 2023 at 3:59 pm #1424797Hi 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
JeannetteNovember 6, 2023 at 4:45 pm #1424802 -
AuthorPosts
- You must be logged in to reply to this topic.