Skip to content

Commit

Permalink
Added callbacks for when the slide changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Saral Kaushik committed Aug 6, 2012
1 parent c652e94 commit 8f23111
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion curtain.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
controls: null,
curtainLinks: '.curtain-links',
enableKeys: true,
easing: 'swing'
easing: 'swing',
nextSlide: null,
prevSlide: null
};

// The actual plugin constructor
Expand Down Expand Up @@ -246,6 +248,11 @@


if(docTop < self.currentP && self.$current.index() > 0){
if (self.options.prevSlide) {
self.options.prevSlide();
}


// Scroll top
self._ignoreHashChange = true;
if(self.$current.prev().attr('id'))
Expand Down Expand Up @@ -304,6 +311,9 @@
}

} else {
if (self.options.nextSlide) {
self.options.nextSlide();
}
// Scroll bottom
self._ignoreHashChange = true;
if(self.$current.next().attr('id'))
Expand Down

0 comments on commit 8f23111

Please sign in to comment.