Skip to content

Commit

Permalink
Expose slideTo speed on the API
Browse files Browse the repository at this point in the history
  • Loading branch information
robd committed Jul 10, 2015
1 parent cbd0f03 commit a322dbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ $('.peppermint').Peppermint({

##API

Peppermint exposes a set of functions upon installation. These functions can be used to controll the slider externally:
Peppermint exposes a set of functions upon installation. These functions can be used to control the slider externally:

`slideTo(n)` – change active slide to `n`;

`slideTo(n, speed)` – change active slide to `n` with transition speed in ms. Passing a speed of 0 disables the transition;

`next()` – next slide;

`prev()` – previous slide;
Expand Down
4 changes: 2 additions & 2 deletions src/peppermint.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ function Peppermint(_this, options) {

//expose the API
return {
slideTo: function(slide) {
return changeActiveSlide(parseInt(slide, 10));
slideTo: function(slide, speed) {
return changeActiveSlide(parseInt(slide, 10), speed);
},

next: nextSlide,
Expand Down

0 comments on commit a322dbb

Please sign in to comment.