Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

A User Macro for Making Panels Collapsible

27 comments

Kmmaughs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 31, 2022

I'm getting a TypeError: Cannot read properties. 

<a id="toggleAll" href="#">Expand/Collapse All sections</a> 
<script type="text/javascript">
AJS.$('.panel .collapsible_panel').each(function()
{
var panel = AJS.$(this).parent().parent();
AJS.$(panel).removeClass('collapsible_panel-open').addClass('collapsible_panel-closed');
AJS.$('.collapsible_panel-button', panel).removeClass('expanded');
AJS.$('.collapsible_panel-text', panel).text('Expand panel');
});
</script>
Sara Phillips
January 27, 2026

Hello, this is an excellent user macro! thank you

Would there be a way to have the whole panel available to click on to expand? As opposed to only being able to click on the "Expand panel" hyperlink on the right hand side.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events