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 accordion elements already open or closed when loading the page. Unfortunately, it does not work in the preferences of the element. With a few lines of Javascript in the theme code or a WP plug-in (e.g. B. custom-css-js) for individual Javascript can be used to good effect.

There are many similar tips on the web for the Elementor accordion, but we couldn’t find any for the Ultimate for Elementor accordion.

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.

Categories

Carl D. Erling, Berlin, CTO
Carl D. Erling, CTO

More news