Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#slideshow .arrow').click(function(){
- var li = slides.eq(current),
- canvas = li.find('canvas'),
- nextIndex = 0;
- // Depending on whether this is the next or previous
- // arrow, calculate the index of the next slide accordingly.
- if($(this).hasClass('next')){
- nextIndex = current >= slides.length-1 ? 0 : current+1;
- }
- if($(this).hasClass('previous')){
- nextIndex = current <= 0 ? slides.length-1 : current-1;
- }
Add Comment
Please, Sign In to add comment