jQuery(document).ready(function(){ if (typeof (wEditor) !== 'undefined') { let accordeonContainer = jQuery('.wItemContainer[data-type="container.accordion"]'); accordeonContainer.each(function (){ let currentAccordeonContainer = jQuery(this); let accordionHeaders = currentAccordeonContainer.find('.accordionHeader'); accordionHeaders.each(function (){ jQuery(this).trigger('click'); }); }); } });