collapse the container when another appears. (in a repeater).

Hi everyone,
I have a repeater with boxes that expand and collapse at the click of a button,I used the following code :

$w.onReady(function () {
$w("#button13").onClick((event, $w) => {
let $item = $w.at(event.context)
const repeatedBox = $item("#box15");
if (repeatedBox.collapsed) {
repeatedBox.expand();
} else {
repeatedBox.collapse();
}
});
})

But I need to collapse all the extended containers when I click to expend a new one.

Thank you.

Any help please!

This is outdated/deprecated Corvid syntax. Try one of these two:
https://www.wix.com/corvid/reference/$w.Repeater.html#onItemReady
https://www.wix.com/corvid/reference/$w.Repeater.html#forEachItem