Skip to content

Instantly share code, notes, and snippets.

@ledovej
Created December 16, 2019 13:22
Show Gist options
  • Save ledovej/5d99dedccc4807406b72d98821dc2fd8 to your computer and use it in GitHub Desktop.
Save ledovej/5d99dedccc4807406b72d98821dc2fd8 to your computer and use it in GitHub Desktop.
Elementor accordion tweak to keep first tab closed
function elementor_accordion_title() { ?>
<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_title', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment