Elementor/Ultimate-Accordion always open/closed?

Elementor/Ultimate-Accordion always open/closed?

By default, when a web page loads, the first element of such an Accordion element is always open, the others closed. The user can later switch all elements normally. It’s all about the default setting when loading the page.

There are design decisions or good SEO reasons to have all Accoirdion elements already open or closed when the page loads. Unfortunately, it does not work in the preferences of the element. However, with a few lines of Javascript in the theme code or a WP plug-in for custom Javascript, you can make do.

Here is the code:

Elementor & Ultimate add-on
Accordion always on

				
					(function($) {
//-- (WRAPPER for jQuery)
	$(document).ready(function (){


	setTimeout(function() {
		// Elementor Accordion immer AUF:
		$('.elementor-tab-title').addClass('elementor-active');
		$('.elementor-tab-content').css('display', 'block'); 

		// ULTIMATE Accordion immer AUF:
		$('.uael-accordion-title').addClass('uael-title-active');
		$('.uael-accordion-content').css('display', 'block'); 	
	}, 100);
	
	
	});
//-- (/WRAPPER)
})( jQuery );
</script>
				
			

Elementor & Ultimate add-on
Accordion always closed

				
					(function($) {
//-- (WRAPPER for jQuery)
	$(document).ready(function (){


	setTimeout(function() {
		// Elementor "Umschalter" Accordion immer ZU:
		$('.elementor-tab-title').removeClass('elementor-active');
		$('.elementor-tab-content').css('display', 'none');
		
		// ULTIMATE Accordion immer ZU:
		$('.uael-accordion-title').removeClass('uael-title-active');
		$('.uael-accordion-content').css('display', 'none'); 	
	}, 100);	
	
	
	});
//-- (/WRAPPER)
})( jQuery );
</script>
				
			

DISCLAIMER: The TBA-Berlin is not a law firm. The content provided here is for general information purposes only and does not constitute legal advice. We recommend that you seek independent legal advice before taking or refraining from taking any action based on the content provided here.

TBA-Berlin makes no representations or warranties, express or implied, as to the accuracy, adequacy, validity, reliability, availability or completeness of the information referenced herein. Your use or reliance on any information contained herein is for your personal use and solely at your own risk.

More news

Email account hacked? What is to be done?

Do you suspect that your email account has been accessed and used by strangers?
For example, are there suspicious emails on the email account that have nothing to do with you, mails in the outbox folder, suspicious replies to mysterious emails?
We give you tips on what to do then. Our customers are also welcome to contact us. We are at your side with advice and support.

Continue reading »