options.htm
11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<!-- saved from url=(0035)http://wizard.ts/index.php/examples -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Verity Wizard - examples</title>
<link rel="stylesheet" href="css/verity-wizard.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="plugins/highlight/styles/github.css" type="text/css" media="screen, projection">
<script src="plugins/jquery-2.1.1.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/highlight/highlight.pack.js"></script>
<script src="js/verity-wizard.js"></script>
<script src="js/example.js"></script>
</head>
<body>
<div class="container">
<div class="site-index">
<div class="jumbotron">
<h1>Step Form Wizard - Options</h1>
<p class="lead">Here is all options of Step Form Wizard plugin.</p>
</div>
<div class="body-content">
<div class="row">
<div class="col-md-12">
<div class="body-content">
<h2>Options</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>duration</td>
<td>Length of animation time between steps.</td>
<td>Number</td>
<td>500</td>
</tr>
<tr>
<td>timingFunction</td>
<td>Animation function. More easing functions are available with the use of plugins, most notably the
<a href="http://jqueryui.com/">jQuery UI suite</a>.</td>
<td>swing | linear</td>
<td>'swing'</td>
</tr>
<tr>
<td>linkNav</td>
<td>Navigation as a link or simple text.</td>
<td>true | false</td>
<td>true</td>
</tr>
<tr>
<td>showNav</td>
<td>Position of navigation. You can also hide navigation.</td>
<td>'top' | 'right' | 'bottom' | 'left' | true | false</td>
<td>true</td>
</tr>
<tr>
<td>showNavNumbers</td>
<td>If numbers in navigation aren't necessary, you can hide them.</td>
<td>true | false</td>
<td>true</td>
</tr>
</tr>
<tr>
<td>showLegend</td>
<td>Show headline legend on top of the content.</td>
<td>true | false</td>
<td>true</td>
</tr>
<tr>
<td>showButtons</td>
<td>Show navigation buttons (Next, Prev, Finish) at bottom of the wizard.</td>
<td>true | false</td>
<td>true</td>
</tr>
</tr>
<tr>
<td>nextBtn</td>
<td>Template for next button. Class "next-btn" is necessary, other classes can be replaced.</td>
<td>Javascript with HTML as default.</td>
<td><pre><code>$('<a class="next-btn sf-right sf-btn" href="#">NEXT</a>')</code></pre></td>
</tr>
</tr>
<tr>
<td>prevBtn</td>
<td>Template for previous button. Class "prev-btn" is necessary, other classes can be replaced.</td>
<td>Javascript with HTML as default.</td>
<td><pre><code>$('<a class="prev-btn sf-left sf-btn" href="#">PREV</a>')</code></pre></td>
</tr>
<tr>
<td>prevBtn</td>
<td>Template for finish button. Class "finish-btn" is necessary, other classes can be replaced.</td>
<td>Javascript with HTML as default.</td>
<td><pre><code>$('<input class="finish-btn sf-right sf-btn" type="submit" value="finish"/>')</code></pre></td>
</tr>
<tr>
<td>onNext</td>
<td>Function for any issue of your choice (for example control of validation.</td>
<td>Name of function or anonymous function. First parameter is a number of actual step, second parameter is jquery wrap for wizard.</td>
<td>function(i) {}</td>
</tr>
<tr>
<td>onPrev</td>
<td>Function for any issue of your choice (for example control of validation.</td>
<td>Name of function or anonymous function. First parameter is a number of actual step, second parameter is jquery wrap for wizard.</td>
<td>function(i) {}</td>
</tr>
<tr>
<td>onFinish</td>
<td>Function for any issue of your choice (for example control of validation.</td>
<td>Name of function or anonymous function. First parameter is a number of actual step, second parameter is jquery wrap for wizard.</td>
<td>function(i) {}</td>
</tr>
<tr>
<td>onSlideChanged</td>
<td>Function for any issue of your choice (for example control of validation.</td>
<td>Name of function or anonym function. First parameter is a number of actual step, second is the number of coming step.</td>
<td>function(to, from) {}</td>
</tr>
<tr>
<td>stepOffset</td>
<td>This is offset in pixels between two steps.</td>
<td>Number</td>
<td>10</td>
</tr>
<tr>
<td>height</td>
<td>Height can be little tricky and you have 4 options to handle it.</td>
<td>'first' (height as first step) | 'auto' (flexible height) | 'tallest' (height as tallest step) | number (height in pixels)</td>
<td>'first'</td>
</tr>
<tr>
<td>theme</td>
<td>Graphics design for wizard</td>
<td>'sea' | 'sky' | 'simple' | 'circle'</td>
<td>'sea'</td>
</tr>
<tr>
<td>markPrevSteps</td>
<td>Visually different previous steps</td>
<td>false | true</td>
<td>false</td>
</tr>
<tr>
<td>startStep</td>
<td>Starting step after wizard is loaded </td>
<td>Number (counting from 0)</td>
<td>0</td>
</tr>
</tbody>
</table>
<h2 style="margin-top: 60px;">Trigger events</h2>
<table class="table table-bordered">
<thead>
<tr>
<th style="width: 110px;">Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>sf-loaded</td>
<td>Is triggered after wizard is initialized.</td>
<td><pre><code>$("#wizard_example_1").on('sf-loaded', function(e) {
alert('Step form wizard was loaded');
})</code></pre></td>
</tr>
<tr>
<td>sf-step-before</td>
<td>Is triggered before transition to next/before <br/> step and still can be interrupted.</td>
<td><pre><code>$("#wizard_example_1").on('sf-step-before', function(e) {
alert('Prepare for next step! Or not if you call preventDefault');
e.preventDefault(); // this you have to call if you need to interrupt transition to next step
})</code></pre></td>
</tr>
<tr>
<td>sf-step-after</td>
<td>Is triggered after transition to next/before <br/> step is done.</td>
<td><pre><code>$("#wizard_example_1").on('sf-step-after', function(e) {
alert('End of transition');
})</code></pre></td>
</tr>
<tr>
<td>sf-finish</td>
<td>Is triggered after transition to next/before <br/> step was done.</td>
<td><pre><code>$("#wizard_example_1").on('sf-finish', function(e) {
alert('Sending form to process or not?');
e.preventDefault(); // this you have to call if you need to interrupt submit form
})</code></pre></td>
</tr>
</table>
<h2 style="margin-top: 60px;">Methods</h2>
<table class="table table-bordered">
<thead>
<tr>
<th style="width: 110px;">Name</th>
<th>Description</th>
<th>Return</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>For shifting step to next one. It will submit form if you call method on last step</td>
<td>true | false</td>
<td><pre><code>var sfw = $("#wizard_example").stepFormWizard();
sfw.next();</code></pre></td>
</tr>
<tr>
<td>prev</td>
<td>For shifting step to previous one.</td>
<td>true | false</td>
<td><pre><code>var sfw = $("#wizard_example").stepFormWizard();
sfw.prev();</code></pre></td>
</tr>
<tr>
<td>finish</td>
<td>For submitting form.</td>
<td>true | false</td>
<td><pre><code>var sfw = $("#wizard_example").stepFormWizard();
sfw.finish();</code></pre></td>
</tr>
<tr>
<td>refresh</td>
<td>If you need redrawing of wizard after pictures or font were loaded.</td>
<td>undefined</td>
<td><pre><code>var sfw = $("#wizard_example").stepFormWizard();
sfw.finish();</code></pre></td>
</tr>
</table>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-left">© <a href="http://ajoke.cz/wizard">ajoke.cz/wizard</a> 2014</p>
</div>
</footer>
</body>
</html>