Cycle through dataset/ repeater with 1 button click

Can anyone tell me how i can just press the button once to scroll the repeater, instead i have to press the button 5 times before it moves anything


I think your trying to scroll to the last item in the repeater →

$w("#repeater1").onItemReady( ($item, itemData, index) => {
 if(index === $w("#repeater1").data.length - 1) {
  $item("#container1").scrollTo();
 }
});

Check here → https://www.wix.com/corvid/forum/community-discussion/scroll-to-last-item-in-repeater?origin=member_posts_page

Hi buddy sadly this didn’t work for me, it never gets even moved lol. but thanks though

@millwards322 Are you getting any error ???
…and surely, you should place the code under the $w.onReady() →

$w.onReady(function () {
 $w("#repeater1").onItemReady( ($item, itemData, index) => {
   if(index === $w("#repeater1").data.length - 1) {
   $item("#container1").scrollTo();
  }
 });
});