Calling prev when in slide 0 will trigger change with index -1 instead of looping to last slide #444

Open
samuelventura opened this Issue Sep 6, 2016 · 0 comments

Projects

None yet

1 participant

@samuelventura

Version is 2.0.3

https://jsfiddle.net/samuelventura/6Lkxqag0/

var slider = $('#slider').unslider({
    keys: false, nav: false
  });
slider.on('unslider.change', function(event, index, slide) {
  console.log("index " + index);
});
//click the prev arrow or execute prev programmatically
//this triggers a -1 notification instead of looping to last slide
slider.unslider('prev'); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment