xxxxxxxxxx
1
<ul class="stepper horizontal" id="horizontal-stepper">
2
<li class="step active">
3
<div class="step-title waves-effect waves-dark">Step 1</div>
4
<div class="step-new-content">
5
<div class="row">
6
<div class="md-form col-12 ml-auto">
7
<input id="email-horizontal" type="email" class="validate form-control" required>
8
<label for="email-horizontal">Email</label>
9
</div>
10
</div>
11
<div class="step-actions">
12
<button class="waves-effect waves-dark btn btn-sm btn-primary next-step" data-feedback="someFunction21">CONTINUE</button>
13
</div>
14
</div>
15
</li>
16
<li class="step">
17
<div class="step-title waves-effect waves-dark">Step 2</div>
18
<div class="step-new-content">
19
<div class="row">
20
<div class="md-form col-12 ml-auto">
21
<input id="password-horizontal" type="password" class="validate form-control" required>
22
<label for="password-horizontal">Your password</label>
23
</div>
24
</div>
25
<div class="step-actions">
26
<button class="waves-effect waves-dark btn btn-sm btn-primary next-step" data-feedback="someFunction21">CONTINUE</button>
27
<button class="waves-effect waves-dark btn btn-sm btn-secondary previous-step">BACK</button>
28
</div>
29
</div>
30
</li>
31
<li class="step">
32
<div class="step-title waves-effect waves-dark">Step 3</div>
33
<div class="step-new-content">
34
Finish!
35
<div class="step-actions">
36
<button class="waves-effect waves-dark btn-sm btn btn-primary m-0 mt-4" type="button">SUBMIT</button>
37
</div>
38
</div>
39
</li>
40
</ul>
1
1
xxxxxxxxxx
1
$(document).ready(function () {
2
$('.stepper').mdbStepper();
3
$('.stepper').on('stepchange', () => {
4
console.log('stepchange')
5
})
6
$('.stepper').on('nextstep', () => {
7
console.log('nextstep')
8
})
9
$('.stepper').on('prevstep', () => {
10
console.log('prevstep')
11
})
12
})
13
14
15
function someFunction21() {
16
setTimeout(function () {
17
$('#horizontal-stepper').nextStep();
18
}, 2000);
19
}
Console errors: 0