Last active
April 17, 2018 10:59
-
-
Save norewp/2373c083ccd309381eebd4d884c04e38 to your computer and use it in GitHub Desktop.
Keep Accordions closed on page load
This file contains hidden or 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 | |
function elementor_accordion_closed() { ?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery( '.elementor-accordion .elementor-tab-title' ).removeClass( 'elementor-active' ); | |
jQuery( '.elementor-accordion .elementor-tab-content' ).css( 'display', 'none' ); | |
}); | |
</script> | |
<?php } | |
add_action( 'wp_footer', 'elementor_accordion_closed', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment