Slide show Problems 🙋

Okay i am trying to create a product slide show in a website but am getting some weird bugs in it, First its suppose to slide back to the first slide when it reaches the last slide but instead it slides to the second slide , And if you try to slide left from the first slide , it just forwards so fast and back to the first slide😞 , I'm pretty confuse and dont know what to do now , guys I'm under alot of pressure , Your advice would help alot, please try to explain with JS code include Thanks alot

3rd Jan 2021, 10:14 PM
Victor Colt
Victor Colt - avatar
1 Answer
+ 2
You should post your code here in order to properly help... The first error seems like u re calling the wrong index of the array (calling 1 which is second element instead 0). For the secondo problem you should probably put a if statement if(slide===slides[0] onclick = null ) in order to prevent action on first slide. Hope it helps somehow. Good luck.
4th Jan 2021, 2:13 AM
Stanislav Stasyuk
Stanislav Stasyuk - avatar