-
-
Save bainternet/ea565b218feed820ddf6a10f83e65eea to your computer and use it in GitHub Desktop.
Keep accordion closed on page load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Leave this out if you already have an opening php tag in your file! | |
function elementor_accordion_title() { ?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery('.elementor-accordion-title').removeClass('active'); | |
jQuery('.elementor-accordion-content').css('display', 'none'); | |
}); | |
</script> | |
<?php } | |
add_action( 'wp_footer', 'elementor_accordion_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment