Guest User

Untitled

a guest
Jun 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('#slideshow .arrow').click(function(){
  2.             var li            = slides.eq(current),
  3.                 canvas        = li.find('canvas'),
  4.                 nextIndex    = 0;
  5.  
  6.             // Depending on whether this is the next or previous
  7.             // arrow, calculate the index of the next slide accordingly.
  8.  
  9.             if($(this).hasClass('next')){
  10.                 nextIndex = current >= slides.length-1 ? 0 : current+1;
  11.             }
  12.             if($(this).hasClass('previous')){
  13.                 nextIndex = current <= 0 ? slides.length-1 : current-1;
  14.             }
Add Comment
Please, Sign In to add comment