Collapse all Accordion Items with button Click

Hi, I need to close all open Accordion Items with a button Click. Do you have any hints for me?
Is there per chance an API like the one for xToggleUpdate?

Hello There,

Thanks for writing in! This can only be possible with a custom JS code. Please edit your page in Cornerstone. Add your accordion element and add a button element. This button element must have an ID. You can add it in the “Customize” tab in the button settings.

And then in Cornerstone custom js section, Custom JS please insert the following custom js code

(function($){
  $('#my-button').on('click touchstart', function(){
    $('.x-acc-header.x-active').trigger('click');
  });
})(jQuery);

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.