Skip to content

Commit

Permalink
Merge pull request thebird#230 from Rapido3011/patch-1
Browse files Browse the repository at this point in the history
Added getNumSlides to Swipe.js
  • Loading branch information
thebird committed Mar 18, 2013
2 parents 42f5383 + a51d52e commit 008e730
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Swipe exposes a few functions that can be useful for script control of your slid

`getPos()` returns current slide index position

`getNumSlides()` returns the total amount of slides

`slide(index, duration)` slide to set index position (duration: speed of transition in milliseconds)

## Browser Support
Expand Down
5 changes: 5 additions & 0 deletions swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ function Swipe(container, options) {
return index;

},
getNumSlides: function() {

// return total number of slides
return slides.length;
},
kill: function() {

// cancel slideshow
Expand Down

0 comments on commit 008e730

Please sign in to comment.