Skip to content

Instantly share code, notes, and snippets.

@imakewebthings
Created September 14, 2011 13:20
Show Gist options
  • Save imakewebthings/1216527 to your computer and use it in GitHub Desktop.
Save imakewebthings/1216527 to your computer and use it in GitHub Desktop.
Extended Slide Events
(function($, deck, undefined) {
$(document).bind('deck.change', function(e, from, to) {
var $prev = $[deck]('getSlide', to-1),
$next = $[deck]('getSlide', to+1);
$[deck]('getSlide', to).trigger('deck.becameCurrent');
$prev && $prev.trigger('deck.becamePrevious');
$next && $next.trigger('deck.becameNext');
});
})(jQuery, 'deck');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment