Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #801086

    Hi,

    is there a way to give the accordion a nice smooth animation when opening it?

    Thank you!

    #801121

    Hey Luisgasser,

    Try adding this in your child theme’s style.css or in Quick CSS:

    .active_tc.toggle_wrap {
        display: none;
    }

    Then add this code to functions.php (this is for toggles that are opened by default which is affected by the css I gave above):

    function add_custom_script(){
    ?>
    <script type="text/javascript">
    (function($){
    	function custom_toggle() {
    		jQuery("#top").find(".active_tc.toggle_wrap").css("display","block");
    	}
    
    	custom_toggle();
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'add_custom_script');

    Let us know if this helps :)

    Best regards,
    Nikko

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