Repeat interactions

Hello!
I am trying to create this slider effect. I want the first image to slide over and transition to a new image and land in the next div. Currently i have done this by just setting the container div to overflow-none, and on click, move both images to the right.

but this is insanly tedious as interactions wont repeat, and i would have to create seperate buttons for each interaction. Is there an easier way of creating this effect?


Here is my public share link: LINK
(how to access public share link)