Buttons and repeaters

Hello fellow WIX community people, I was wondering if anyone knows how to make a button expand a repeater. So my repeater is collapsed on load, and my button is above it (when im in thee editor), when i click on the button i want the repeater to expand. But if another repeater has been opened, i want it to close when a different button is clicked.
EX:
Button — clicked
Button
button

Button -
repeater

Button —clicked
Button

Button
Button -
repeater

Button

I hope I am explaining correctly. Anyway thank you!

Hi,
The first thing you want to do is to create onClick events to those buttons.
The next step is to write the event functions, those functions should look like this:

function button1_click(event, $w) {
  $w('#repeater1').expend();
  $w('#repeater2').collapse();
}

function button2_click(event, $w) { 
  $w('#repeater1').collapse(); 
  $w('#repeater2').expend(); 
}

Good luck!
For more information:

Roi.