bartaz/impress.js — pull request #49 by Haacked (2012-01-12 06:02:25+00:00)
Title: Implemented a simple API for intercepting navigation.

This is a really simple API just for navigation. I know you probably want to do a lot more than this, but I thought I'd submit the simplest thing that would work and this is all I need right now. :)

This change allows developers to provide custom code that runs when navigating from one step to the next. The following is an example of how a navigation handler might be setup within the top of the html page of the presentation.

Each method provides the before element and the element we're navigating to. This allows the developer to determine whether they're moving forward or backward. But also lets them transition out the old element and transition the new one if need be.