How to expand just 1 item from a repeater?

I have created a custom FAQ section using a repeater. I would like to open only one collapsed item at a time. I have my repeater connected to a dataset which holds the questions and answers.

Heres what happens currently:

Heres the functionality Im looking for:

Heres the code I have currently:

$w.onReady(function () {


export function container2_click(event) {

if( $w("#text45").collapsed ) {
else {


I have read through the repeater API but couldn’t find a solution. Any help would be great.


Bill, there are some subtle concepts to digest in the repeater documentation. Re-read the portion called “Repeated Item Scope”.

Here’s how it would go with your code:

export function container2_click(event) {
let $item = $;
if( $item("#text45").collapsed ) {
else {


There is also this example that you can look at too.

@tony-brunsman thank you! ill have a re read.

Thank you @givemeawhisky