Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // if (n > slides.length) {slideIndex = 1} // code to check end
  2. // if (n < 1) {slideIndex = slides.length} // code to check beginning
  3.  
  4. if (n>slides.length || n<1) return; // my addition to not execute if either
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement