Collapsible Content

@tamino-haas Not everything is going to be able to be turned into a component on Wix.

You’re going to need something like this if you want to show and hide the element:

$w.onReady(function () {

    $w('#buttonID').onClick(() => {
        if ($w('#elementID').hidden) {
            $w('#elementID').show();

        } else {
            $w('#elementID').hide();
        }
    })
})

or if you want to expand and collapse the element you would need this:

$w.onReady(function () {

    $w('#buttonID').onClick(() => {
        if ($w('#elementID').collapsed) {
            $w('#elementID').expand();

        } else {
            $w('#elementID').expand();
        }
    })
})

In both examples, you would need to change the buttonID for the id of the button you are using to trigger the expand/collapse or show/hide

And you will need to change elementID for the element id of the element you want to expand/collapse or show/hide