Basic Usage

Wrap your Bootstrap Tabs HTML with a DIV Container and add a CSS class or an ID to it.
Select your Element with jQuery and add jBsWizard to it.
When you use multiple element selector to add jBsWizard, then there will be an instance for every Element.

// Include jBsWizard
<link rel="stylesheet" href="path/to/jBsWizard/source/jquery.jBsWizard.min.css">
<script src="path/to/jBsWizard/source/jquery.jBsWizard.min.js"></script>

// Initialize jBsWizard
<script type="text/javascript">
    $(function() {
        $('#j-bs-wizard-example').jBsWizard();
    });
</script>

Options

You can set options as an object for advanced initializing jBsWizard

// set option Object like this, i.e. not using Progress Bar
var options = {
    useProgressBar: false
}

// Initialize jBsWizard
<script type="text/javascript">
    $(function() {
        $('#j-bs-wizard-example').jBsWizard(options);
    });
</script>
Name Type Default Description
nextBtnStr String 'Next' Will be used for creating Next Button
nextBtnAdditionalClass String '' Additional Classes for Next Button, separated by space
prevBtnStr String 'Previous' Will be used for creating Previous Button
prevBtnAdditionalClass String '' Additional Classes for Previous Button, separated by space
waitASecondDelay Integer 1000 Set Milliseconds for Fake Process Time
processingFadeSpeed String | Integer 'fast' 'fast', 'slow' or Integer
See http://api.jquery.com/fadeTo/
useProgressBar Boolean true For Showing and using of the Progress Bar

Methods

After jBsWizard is initialized, there are accessible methods like .nextStep() or .goToStep(). Set the initialisation to a variable.

<script type="text/javascript">
    $(function() {
        // Initialize jBsWizard and set it to a variable
        var jBsWizard = $('#j-bs-wizard-example').jBsWizard();

        // I.e. go to the second Step (counting starts at 0)
        jBsWizard.goToStep(1);
    });
</script>
Caller Params Description
.init() none Initializes jBsWizard to Element with all necessary Elements and CSS Classes (optional by advanced Options).
If already initialized .destroy() will be executed first.
.destroy() none Destroys jBsWizard from Element, all added Elements and Classes will be removed!
.showProcessing() none Shows the Processing Indicator.
.hideProcessing() none Hides the Processing Indicator.
.nextStep() none Go to the next Step. Will be executed by click on "Next Button".
.prevStep() none Go to the previous Step. Will be executed by click on "Previous Button".
.goToStep() Numeric Go to the specified Step if exists. Default is 0. Please note that counting starts at 0!
.steps() none Returns an Object with Steps Information. See Steps Object below for Example

Events

jBsWizard triggers events to hook in and increase the Functionality. Every event gives the extra Parameter instance with the whole Instance from jBsWizard.

<script type="text/javascript">
    $(function() {
        // Initialize jBsWizard and set it to a variable
        var jBsWizard = $('#j-bs-wizard-example').jBsWizard();

        // I.e. the goToStep Event with additional extra Parameter 'steps'
        jBsWizard.on('jBsWizard.initializing', function(e, instance, steps) {
            var getSteps = JSON.stringify(steps, null, 4);
            alert(getSteps);
        });
    });
</script>
Event Type extra Parameter Description
'jBsWizard.initializing' instance Fires when .init() starts.
'jBsWizard.initialized' instance Fires when .init() is finished.
'jBsWizard.destroy' instance Fires when .destroy() starts.
'jBsWizard.destroyed' instance Fires when .destroyed() is finished.
'jBsWizard.showProcessing' instance Fires when .showProcessing() executes.
'jBsWizard.hideProcessing' instance Fires when .hideProcessing() executes.
'jBsWizard.prevStep' instance Fires when .prevStep() executes.
'jBsWizard.nextStep' instance Fires when .nextStep() executes.
'jBsWizard.goToStep' instance, steps Fires when .goToStep() is finished.
Gives an additional extra Parameter 'steps' with an object of Steps Information. See Steps Object below for Example

Example Wizard

Set Options for Example
Actions
Init Destroy
Show Processing Hide Processing
Previous Next Steps
Steps Object
Event Log clear

Example Wizard

First Step

[...]

Second Step

[...]

Third Step

[...]

Fourth Step

[...]

Fifth Step

[...]

Sixth Step

[...]