impress.js uses the step
class to identify an item as a step in the presentation and apply necessary effects. At any given stage, each step has one of the three classes present
, past
, or future
. In the previous chapters, we learned how to use these classes to provide custom functionality. Now we are going to look at the life cycle of a step using these three classes.
Each step on the impress presentation is given the class future
on initialization. When the step becomes the current active step, the present
class will be assigned and the future
class will be removed. In the next step transition, the current step is assigned the class past
and next step becomes present
. After that the last step presentation will start again from the beginning and present
class will be assigned. This cycle continues until you stop the presentation.