Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if (n > slides.length) {slideIndex = 1} // code to check end
- // if (n < 1) {slideIndex = slides.length} // code to check beginning
- if (n>slides.length || n<1) return; // my addition to not execute if either
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement