Uniqe ID in a repeater

Hello,
I have a repeater with slider galleries. I need to modify with onClick function every gallery to change images on click. Also have two texts for each gallery. Title and description. When I click on title, description appears (default value hidden) and title will hide. Bellow are the lines used with simple galleries. Because every image, text, etc in a repeater has the same id, I can’t use this because will change all the items simultaneously. I find this post ( https://www.wix.com/velo/forum/community-discussion/no-unique-ids-for-buttons-in-one-repeater ), but sincerely I don’t understand what i need in my situation. Many thanks :slight_smile:

export function gallery1_itemClicked(event) {
$w( “#gallery1” ).next()
}

export function text1_click(event) {
$w( “#text2” ).show( “fade” );
$w( “#text1” ).hide();
}

The best source of information is right in the Velo API documentation .

For your issue, you need to see Retrieve Repeater Item Data When Clicked .

As an example, let’s take your gallery1_itemClicked() function. You need to modify it to something like this:

export function gallery1_itemClicked(event) {
   let $item = $w.at(event.context); // get repeated item scope selector
   $item("#gallery1").next(); // use $item and not $w on this line
}

You should modify text1_click() similarly.

Thanks Yisrael, but still don’t work. Seems the retrieve image repeater works only with containers, and I have two columns, so two galleries in a container. One with images one with drawings. When I click on images gallery, also drawings gallery goes forward. I’ll look for other solutions