Minimal content "slider" for jQuery. Uses CSS3 animations only, falls back to pure CSS display
.
Easy.
-
Include
multisteps.js
andmultisteps.css
in your page. -
Create a DOM structure like this:
<div id="slider"> <div class="step">First step</div> <div class="step">Second step</div> <div class="step">Third step</div> </div>
-
Initialize:
$( '#slider' ).multisteps( options );
You may provide the following options. (Changing them afterwards is not possible at the moment.)
The index or id of the starting step.
Default: 0
Calling "next" on the last step returns to the first one.
Default: false
Changing this to "horizontal" won't restrict the container's height.
Default: vertical
The name of the CSS3 class for a showing up step. The default is provided in the multisteps.css
.
Default: fadeInUp
The name of the CSS3 class for a closing step. The default is provided in the multisteps.css
.
Default: fadeOutUp
A callback function triggered at the moment the command for a step change comes in.
Default: function () {}
A callback function triggered at the moment a step change completes.
Default: function () {}
Use the following methods like this:
$( '#slider' ).multisteps( methodName, arguments... );
Returns a jQuery collection containing the currently active step.
Returns the index of the currently active step.
If there is a previous step. Returns false
if the first step is active, even if loop: true
.
If there is a next step. Returns false
if the last step is active, even if loop: true
.
Shows the previous step.
Shows the next step.
Shows the first step.
Shows the last step.
Shows the step with the index / id to
.
Recalculates the height of the container. Automatically called after step change. orientation: vertical
only.