Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom Accordion

Put class custom-acc-toggle in the element that will serve as toggle.

Put a class custom-acc-content on the content main div/container

/*
Headline class - (custom-acc-toggle)
Content div class - (custom-acc-content)
*/


jQuery(document).ready(function($){
  $( ".custom-acc-toggle" ).click(function() {
    var customAccContent = $(this).next();
    $( customAccContent ).slideToggle( "slow" );
    $( this ).find(".x-graphic-child").toggleClass( "rotate180" );
  });
});