Search
Close this search box.

Accordion element in Elementor closed at the beginning

Elementor Accordion

PageBuilder Elementor comes with a lot of handy widgets by default. One of them is the „Toggle“ and „Accordion“ widget.

What is the difference between the toggle and the Accordion widget?

The toggle widget opens each element individually. You can have all elements open at the same time.

The Accordion widget closes all other elements when you open one. By default, the first element of the Accordion is open. But sometimes you want to have all Accordion elements closed from the beginning. This can be done with a small script.

Elementor Accordion

In the following video I show you how it works!

YouTube

Mit dem Laden des Videos akzeptieren Sie die Datenschutzerklärung von YouTube.
Mehr erfahren

Video laden

How to display all Accordion elements closed

To show all Accordion elements closed when entering the page, you just have to place an HTML widget anywhere and insert the following code. I usually place it just below the Accordion (the visitor to the web page will not see this element).

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

Then save the page and the Accordion elements are closed.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Weitere Artikel

Das Bento Grid Layout zählt definitiv zu den Design Trends 2024. Von der aus japan stammenden Bento Box abgeleiteten Aufteilung an Inhalten hat sich regelrecht …

Icons verleihen deiner Webseite nicht nur einen ästhetischen Touch, sondern sind auch ein wichtiges Element für die Benutzerfreundlichkeit. Viele Tools bieten bereits eine Vielzahl von …