Accordion with expand/collapse button

A quick javascript snippet to use a couple of Button to expand/collapse all voices of a Accordion Skin
Donatello
The blue ninja turtle was the leader of the squad
Michelangelo
With the orange mask he was the funny guy of the team
Leonardo
He use its blades versus the Foot Clan
Raphael
A pizza eater with the violet like Shredder coat

Add an HTML Widget with the below code after the other widgets and replace widget IDs with your own, or set “expand” and “collapse” on the Buttons ID, and “accordion-skin” on the CSS ID of the Query Widget.

				
					<script>
jQuery('#expand').on('click',()=>{
    jQuery('#accordion-skin article:not(.e-add-accordion-active) .e-add-accordion-head').trigger('click');
    return false;
});
jQuery('#collapse').on('click',()=>{
    jQuery('#accordion-skin article.e-add-accordion-active .e-add-accordion-head').trigger('click');
    return false;
});
</script>