I’m using the script that was provided here on the support forum to link to another page with an accordion and open it, which is working great other than it breaks the ability to collapse that specific accordion. Is there a workaround that allows me to link to and open an accordion on another page while still retaining the ability to then close it?
Here’s the script I’m using:
jQuery(document).ready(function($) {
var hash = window.location.hash;
var accBody = $(hash + '.x-accordion-group').find('.x-accordion-body');
if (hash != '') {
$(accBody).each(function(){
$(this).removeClass('collapse');
$(this).addClass('in').css('height', 'auto');
});
}
});