xxxxxxxxxx
1
<ul class="stepper" data-mdb-stepper-init data-mdb-stepper-linear="true">
2
<li class="stepper-step stepper-active">
3
<div class="stepper-head">
4
<span class="stepper-head-icon">1</span>
5
<span class="stepper-head-text">step1</span>
6
</div>
7
<div class="stepper-content py-3">
8
<div class="form-outline" data-mdb-input-init>
9
<input type="text" id="events-input-1" class="form-control" />
10
<label class="form-label" for="events-input-1">step 1</label>
11
</div>
12
</div>
13
</li>
14
<li class="stepper-step">
15
<div class="stepper-head">
16
<span class="stepper-head-icon">2</span>
17
<span class="stepper-head-text">step2</span>
18
</div>
19
<div class="stepper-content py-3">
20
<div class="form-outline" data-mdb-input-init>
21
<input type="text" id="events-input-2" class="form-control" />
22
<label class="form-label" for="events-input-2">step 2</label>
23
</div>
24
</div>
25
</li>
26
<li class="stepper-step">
27
<div class="stepper-head">
28
<span class="stepper-head-icon">3</span>
29
<span class="stepper-head-text">step3</span>
30
</div>
31
<div class="stepper-content py-3">
32
<div class="form-outline" data-mdb-input-init>
33
<input type="text" id="events-input-3" class="form-control" />
34
<label class="form-label" for="events-input-3">step 3</label>
35
</div>
36
</div>
37
</li>
38
</ul>
1
1
xxxxxxxxxx
1
document.querySelector('.stepper').addEventListener('stepChange.mdb.stepper', (e) => {
2
console.log('stepChange', e.currentStep);
3
});
4
Console errors: 0