Skip to content

Commit

Permalink
fix(#40): make it possible to close accordions
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSolberg committed Oct 25, 2025
1 parent 6b7b721 commit d83e23d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/AcceptedFiltering/threePanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@ function insertSection({ headerId, headerText, listId }) {
menu.appendChild(header)
menu.appendChild(panel)
}

accordionRefresh()

header.addEventListener('click', () => {
if ($(menu).accordion && $(menu).data('uiAccordion')) return
if (window.jQuery) {
const $p = window.jQuery(panel)
$p.is(':visible') ? $p.slideUp(350) : $p.slideDown(350)
return
}
})
}

/**
Expand Down

0 comments on commit d83e23d

Please sign in to comment.