How do I go to different slides in my slideshow based on which button I click in my repeater?

I have a repeater on my first slide and I would like it to go to a different slide based on which container in my repeater the user clicks on. I initially thought I could do this with some simple code

$w . onReady ( function () {
$w ( “#container4” ). onClick (( event ) => {
$w ( “#fullWidthSlides1” ). changeSlide ( 2 );
})});

and then repeat for each different container and different slide, but then I realised that every container in the repeater has the same unique ID so that that was not going to work. I am still VERY new to all this so I would appreciate it if someone could help me solve this problem. Thank you!

Try this one…

$w.onReady(function(){
   $w("#myRepeater").onItemReady(($item, itemData, index)=>{     
      $item("#container4").onClick(()=>{console.log(index)
         $w("#fullWidthSlides1").changeSlide(index);
      });
   });
});

Do not forget to change the repeater-ID ! (i don’t know how is called your repeater).

Still not working for me but thanks for the reply! Is there any way to see which item corresponds to which index?

You can add a console-log into your code-snipet, to make the INDEX and it’s related VALUE visible.