wdpr
    Preparing search index...

    Module collapsible

    Runtime module for [[collapsible]] block toggle behavior.

    Sets up a delegated click event listener on the root element to detect clicks on a.collapsible-block-link elements. Clicking toggles between the folded and unfolded states by manipulating display styles on the .collapsible-block-folded and .collapsible-block-unfolded containers.

    When the fade option is enabled (default), opening a collapsible block triggers a 200ms CSS opacity fade-in animation on the content.

    DOM interactions:

    • Listens for click on a.collapsible-block-link within .collapsible-block
    • Toggles display between "block" and "none" on folded/unfolded divs
    • Optionally applies a fade-in transition on .collapsible-block-content

    The destroy() cleanup function removes the click listener.

    Functions

    initCollapsible