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

Share on whatsapp
WhatsApp
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on telegram
Telegram

Leave a Reply

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

Share on facebook
Share on whatsapp
Share on telegram
Share on email
Share on twitter
Share on pinterest
Share on linkedin