MultiWEBPress
Wordpress & Shopify Experts

MultiWEBPress
Wordpress & Shopify Experts

Elementor accordion closed by default using Javascript & CSS

How to close the Elementor accordion automatically (by default)?

To make the Elementor accordion closed by default, write the following custom script:

 
				
					<script>
jQuery(document).ready(function($) {
var wait = 50; setTimeout(function() {
$('.elementor-tab-title').removeClass('elementor-active');
 $('.elementor-tab-content').css('display', 'none'); }, wait);
});
</script>
				
			

You can copy & paste the above exact code into your Elementor page and before the accordion widget. Drag & drop an HTML widget on top of the accordion and paste the above code. See the screenshot below:

METHOD 2

				
					.elementor-accordion > div:first-of-type { display:none;}

				
			

SHARE

WhatsApp
Facebook
Twitter
LinkedIn
Telegram

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*