Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #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”

    #1374759

    This 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.

    #1375224

    Hi,

    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ünter

    #1375238

    the 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?

    #1375247
    #1375253

    A 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 not

    function 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 ?

    #1375326

    Hi,

    Yes. Only ‘av_icon_circles’ are changed.

    Best regards,
    Günter

    #1376215

    Now: 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.

    #1376254

    Percentage 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

    #1376753

    Hi,

    Was a CSS problem. I changed the classes to return and now you can use any value you like:

    https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/ALB%20Elements/Animations/avf_alb_element_animation.php

    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ünter

    #1376790

    you 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.

    #1376873

    Hi,

    Yes, changes are in 5.3.1

    Best regards,
    Günter

    #1376925

    Works perfectly – thanks – and just for the others :
    That filter is implemented in : gallery, icon-circles, icon, image_hotspots, numbers, progressbar, testimonials and timeline.

    #1413413

    Sorry 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…

    #1413423

    Hi,
    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,
    Mike

    #1413538

    Works perfectly! I appreciate it!

    #1413586

    Hi,
    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

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘avia_animate_when_visible : how to hamper – or to change offset’ is closed to new replies.