-
AuthorPosts
-
December 1, 2022 at 11:40 am #1374583
on a circle element i thought there was an option to switch of the mentioned option above. –
How to get rid of those animations on elelments ?Or even better the question: How to influence the offset for a certain element?
Reason: The animation should start earlier at a certain “icon circles”December 2, 2022 at 11:56 am #1374759This works:
function change_waypoints_offset_on_specific_element(){ ?> <script> window.addEventListener("DOMContentLoaded", function () { (function($) { if( $.fn.avia_waypoints ){ if( typeof container == 'undefined' ){container = 'body';} $('#customID.avia_animate_when_visible', container ).avia_waypoints( { offset: '95%'} ); } })(jQuery); }); </script> <?php } add_action('wp_footer', 'change_waypoints_offset_on_specific_element', 999);
but i think a different method before generating the element would be better.
December 6, 2022 at 1:41 pm #1375224Hi,
There is already a new container class av-animated-when-visible-95 (see enfold\js\shortcodes.js – function activate_waypoints() since 5.0 ).
I will add filter ‘avf_alb_element_animation’ (will try for 5.3) to elements.
Best regards,
GünterDecember 6, 2022 at 3:52 pm #1375238the 95% was only an example value (admittedly a poorly chosen) – so f.e. 15%
can you give us an example how to use that filter to change the offset amount or to block the animation?December 6, 2022 at 5:30 pm #1375247Hi,
Added more animation classes:
https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_2_1/js/shortcodes.js
See activate_waypoints().
Best regards,
GünterDecember 6, 2022 at 6:43 pm #1375253A question about understanding the filter application:
The shortcode name is what we can find in the corresponding alb under $this->config[‘shortcode’]
and to positivly influence only av_icon_circles ? the != means notfunction custom_alb_element_animation( $class_animation, array $atts, aviaShortcodeTemplate $sc, $shortcodename ){ if( $shortcodename == 'av_icon_circles' ){ return 'av-animated-when-visible-40'; // corrected here - the class without dot } return $class_animation; } add_filter( 'avf_alb_element_animation', 'custom_alb_element_animation', 10, 4 );
This way is possible too ?
December 7, 2022 at 11:09 am #1375326December 14, 2022 at 8:07 pm #1376215Now: i think the code had to be set without the dot before the added class!
( av-animated-when-visible-40 ) no dot
and in that list ( // @since 5.3 – new offsets added to support filter ‘avf_alb_element_animation’ )
why is the 90 and 95 missing – but even if it is present in that list – 95 does not work.December 15, 2022 at 11:26 am #1376254Percentage Offset
A percentage offset refers to a percentage of the window’s height. An offet of ‘50%’ will trigger when the top of the element is 50% of the way from the top of the window, or simply put, hits the middle of the window.what is the default offset if i do not influence the setting? – it seems to be a less percentage setting
December 19, 2022 at 5:49 pm #1376753Hi,
Was a CSS problem. I changed the classes to return and now you can use any value you like:
what is the default offset if i do not influence the setting?
‘bottom-in-view’
no center logo
check config-templatebuilder\avia-shortcodes\icon_circles\icon_circles.css line 52ff.
Best regards,
GünterDecember 19, 2022 at 9:39 pm #1376790you changed it in 5.3.1 ? or
and yes i do know that “no center logo” lines – but scaling of 0.1 – is not enough – the inner circle is seen before the animation starts.
December 20, 2022 at 1:10 pm #1376873December 20, 2022 at 9:01 pm #1376925Works perfectly – thanks – and just for the others :
That filter is implemented in : gallery, icon-circles, icon, image_hotspots, numbers, progressbar, testimonials and timeline.July 16, 2023 at 4:39 pm #1413413Sorry to get back on this topic: What is actually to do to start the “icon circles” earlier? Or is the animation even deactivateable?
I do not get it out from the conversation above…July 16, 2023 at 8:24 pm #1413423Hi,
To have the icon circle animate earlier try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_alb_element_animation( $class_animation, array $atts, aviaShortcodeTemplate $sc, $shortcodename ) { if( $shortcodename != 'av_icon_circles' ) { return $class_animation; } return 'av-custom-animated-top-99'; } add_filter( 'avf_alb_element_animation', 'custom_alb_element_animation', 10, 4 );
Best regards,
MikeJuly 17, 2023 at 9:08 pm #1413538Works perfectly! I appreciate it!
July 18, 2023 at 12:00 pm #1413586Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘avia_animate_when_visible : how to hamper – or to change offset’ is closed to new replies.