Giter VIP home page Giter VIP logo

jquery-wizard's Introduction

jQuery Wizard

About

jQuery Wizard turns your forms into beautiful wizards without cluttering your markup.

Usage

<!DOCTYPE html>

<html>
    <head>
    
        <script type="text/javascript" src="jquery.wizard.js"></script>
        <script type="text/javascript">
        
            $(document).ready(function(){
                $('form').wizard()  
            })
            
        </script>
        
    </head>
    <body>
    
        <form method="POST">
            <fieldset>
                <legend>Personal information</legend>
                
                <label>Full name</label>
                <input type="text" name="name" />
                
                <label>Age</label>
                <input type="text" name="age" />
            </fieldset>
            
            <fieldset>
                <legend>Random information</legend>
                
                <label>Something</label>
                <input type="text" name="something" />
            
                <label>Anything</label>
                <input type="text" name="anything" />
            </fieldset>
            
            
            <input type="submit" value="Submit" />
        </form>
        
    </body>
</html>

Options

The wizard may be customized by passing an object with any of the following properties to the wizard() function.

  • element - A string or element describing the element to be paged. Defaults to 'fieldset'.
  • initialStep - An integer describing which step the wizard should display initially. Defaults to 1.
  • labels - An object with properties next and previous, whose values should be strings describing what the labels of the next and previous-buttons should read, respectively. Defaults to 'Next' and 'Previous'.
  • animations - An object with properties next and previous, whose values should be functions describing the transitions between steps. These functions are passed two arguments; the element being hidden, and the element being shown.

Example

$('form).wizard({
    initialStep: 2,
    labels: {
        next: "I'm done, let's go!",
        previous: "Wait a minute..."
    },
    animations: {
        next: function(x, y){
            $(x).hide()
            $(y).show()
        },
        previous: function(x, y){
            $(x).hide()
            $(y).show()
        }
    }
})

Requirements

jQuery 1.4.x

jquery-wizard's People

Contributors

jgorset avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.