Creates a collapsible div
content
- Content inside the collapsible container
id
- Div id (Important - an id cannot be assigned to multiple elements at once)
show
- If true
, the collapsible div will be shown when the page is loaded
Creates a link which can be used with custom_link(..) to toggle the collapsible div
id
- The ID of the collapsible div
echo collapsible_div("Content 1", "collapse1", "true"); echo custom_link("outline-button", collapse_link("collapse1"), "Hide/Show Content1", "primary", no_arg()); echo custom_link("outline-button", collapse_link("collapse2"), "Hide/Show Content2", "secondary", no_arg()); echo collapsible_div("Content 2", "collapse2", no_arg());