jQuery Step-By-Step-Wizard
Categories: Featured, JavaScript and jQuery
Written By: admin
Ein Step-By-Step-Wizard, zu Deutsch “Schritt für Schritt Editor” ist eine Darstellungsmittel, um Benutzer Scritt für Schritt durch einen Prozess, zum Beispiel das ausfüllen eines langen Formulares, zu leiten. Der Prozess wird dadurch für den Benutzer vereinfacht und er erhält einen Überblick darüber, in welchen Teil des Prozesses er sich zu jedem gegebenen Zeitpunkt befindet.
Besonders praktisch wird ein solcher Step-By-Step-Wizard, wenn er ohne Seitenreload funktioniert, also zum Beispiel in JavaScript implementiert ist. Das hier vorgestellte Script basiert auf dem JavaScript Framework jQuery und erstellt aus einer beliebigen Anzahl Elemente einen “Schritt für Schritt Editor”.
Diesmal agiert der ganze Blog-Eintrag als Demonstration des Scriptes. Das ist der erste Schritt des Step-By-Step-Wizards. Zum nächsten kommst du über die Navigation oben rechts.
<div class="stepByStepWizard">Text...</div>
Natürlich können auch einfach alle Paragraphen, Tabellen, Bilder o.Ä umgeformt werden.
Sämtliches Zusatz-HTML wie die Titelleiste oder die Navigation wird vom Script erstellt. Benutzer ohne JavaScript merken nicht einmal, dass normalerweise ein Wizard vor Ihnen stünde. Die einzelnen Schritte werden dann untereinander angezeigt.
Wenn du weitere Funktionen benötigen solltest kannst du diese sicher leicht selber implementieren.
1. In der Datei “stepByStepWizard.js” die “User specific variables” nach eigenen Bedürfnissen anpassen.
2. JavaScript:
<script src="path/to/stepByStepWizard.js" type="text/javascript"></script>
3. CSS (nach belieben zu verändern):
/************************************************ * Step by step wizard * ************************************************/ .floatLeft { float: left; } .floatRight { float: right; } .clearBoth { clear: both; } .showCurrentStepNmbrDIV { color: #000000; border-bottom: 3px double #999; font-weight: bold; font-size: 13px; margin: 0px 0px 0px 0px; padding: 0px 0px 5px 0px; width: 90%; height: 14px; background-color: #CEE1EF; border-top: 1px solid #999; } .stepByStepWizard { padding: 10px; border-bottom: 1px solid #999; background-color: #EAF3FA; } .stepByStepWizardNavigation { color: #000000; border-bottom: 3px double #999; font-weight: bold; font-size: 13px; margin: 0px 0px 0px 0px; padding: 0px 0px 5px 0px; width: 10%; height: 14px; background-color: #CEE1EF; border-top: 1px solid #999; } .stepByStepWizard_goto { width: 20px; } .showNavigationLinksForwardDIV { cursor: pointer; float: right; width: 15px; } .showNavigationLinksBackDIV { cursor: pointer; float: right; width: 15px; }
English summary:
The script above shows a step by step wizard written with jQuery. It’s absolute unobtrusive (try it disabling JavaScript) and fully customizable (via CSS). You can use the script on you own site. Note that the script itself actually is written in english, so editing it won’t be big deal.
If you chose to run the script on your site you need to install it. That’s done in three simple steps:
First of all you need to insert the above JavaScript file into you website:
<script src="path/to/stepByStepWizard.js" type="text/javascript"></script>
In a second step you’re going to build the markup for your wizard. You can convert anything into such a wizard, but in this example we’ll stick with some DIV’s + a given class (stepByStepWizard). If you want to construct a wizard with three steps, all you have to write is:
<div class="stepByStepWizard">Step 1</div> <div class="stepByStepWizard">Step 2</div> <div class="stepByStepWizard">Step 3</div>
The last thing left to do ist to define some CSS. We’ll use the CSS for the wizard above, but you can modify it to look like the rest of your site:
/************************************************ * Step by step wizard * ************************************************/ .floatLeft { float: left; } .floatRight { float: right; } .clearBoth { clear: both; } .showCurrentStepNmbrDIV { color: #000000; border-bottom: 3px double #999; font-weight: bold; font-size: 13px; margin: 0px 0px 0px 0px; padding: 0px 0px 5px 0px; width: 90%; height: 14px; background-color: #CEE1EF; border-top: 1px solid #999; } .stepByStepWizard { padding: 10px; border-bottom: 1px solid #999; background-color: #EAF3FA; } .stepByStepWizardNavigation { color: #000000; border-bottom: 3px double #999; font-weight: bold; font-size: 13px; margin: 0px 0px 0px 0px; padding: 0px 0px 5px 0px; width: 10%; height: 14px; background-color: #CEE1EF; border-top: 1px solid #999; } .stepByStepWizard_goto { width: 20px; } .showNavigationLinksForwardDIV { cursor: pointer; float: right; width: 15px; } .showNavigationLinksBackDIV { cursor: pointer; float: right; width: 15px; }
You’re done! If you wish to change standard texts, starting step or which element should be transformed, open the script and edit the section “User specific variables”. If you encounter any problems or have a question just leave a comment.





September 11th, 2008 at 6:08 pm
Hey mate, i made your menu a litle bit configurable, ’cause now all the general config depends on the page you put the wizard menu. Its not the big thing i did but i think is very usefull, you made a great work with your menu. Send me a email if you want to see what ive done. Take care and keep it going, you saved my life XD.
September 13th, 2008 at 12:23 pm
You got email
January 6th, 2009 at 10:24 pm
do you have a demo?