Knowledge Base

Table of Contents

Updated on May 26, 2023

Make Elementor Accordion Widget Closed by Default

Overview

Elementors Accordion widget defaults to first accordion being open. We want this to be closed by default so a visitor has to pressed the accordion to open.

Solution

Add html widget in same container just above accordion widge. Add the following code to the html widget.

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