DiviJavascript

Divi Accordion Closed by Default

By May 14, 2020No Comments

Just like it reads – will collapse the first accordion object in Divi theme for WordPress 🙂

<script>
jQuery(function($){
    $('.et_pb_accordion .et_pb_toggle_open').addClass('et_pb_toggle_close').removeClass('et_pb_toggle_open');

    $('.et_pb_accordion .et_pb_toggle').click(function() {
      $this = $(this);
      setTimeout(function(){
         $this.closest('.et_pb_accordion').removeClass('et_pb_accordion_toggling');
      },700);
    });
});
</script>

Contact us to learn about adopting the web for your business

Jarod Thornton

Author Jarod Thornton

More posts by Jarod Thornton