Created
September 14, 2011 13:20
-
-
Save imakewebthings/1216527 to your computer and use it in GitHub Desktop.
Extended Slide Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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