My image slider is based on jQuery but I'm facing a problem. When the page loads or reloads, the second image of the slider appears in the visible area overlapping the first image like this: https://i.sstatic.net/osbfb.png
However, if I click the arrow to view the next image and then go back to the first image, it displays correctly without the second image being visible. It should look like this after loading the page: https://i.sstatic.net/YVeiN.png
So, I'm wondering what changes I need to make to ensure that my slider looks like the second screenshot when the page loads?
Here is the HTML code I'm using (with Bootstrap 4):
HTML code here...
I have also included the Sass code:
Sass code here...
And finally, the jQuery implementation:
jQuery code here...