xxxxxxxxxx
1
<!-- Button trigger modal -->
2
<button
3
type="button"
4
class="btn btn-primary"
5
data-mdb-toggle="modal"
6
data-mdb-target="#exampleNonInvasiveModal1"
7
>
8
Launch demo modal
9
</button>
10
11
<!-- Modal -->
12
<div
13
class="modal fade"
14
id="exampleNonInvasiveModal1"
15
tabindex="-1"
16
role="dialog"
17
aria-labelledby="exampleNonInvasiveModal1Label"
18
aria-hidden="true"
19
data-mdb-modal-non-invasive="true"
20
>
21
<div class="modal-dialog modal-side modal-top-left" role="document">
22
<div class="modal-content">
23
<div class="modal-header">
24
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
25
<button
26
type="button"
27
class="btn-close"
28
data-mdb-dismiss="modal"
29
aria-label="Close"
30
></button>
31
</div>
32
<div class="modal-body">
33
34
35
36
<!-- Button trigger modal -->
37
<button
38
type="button"
39
class="btn btn-primary"
40
data-mdb-toggle="modal"
41
data-mdb-target="#exampleNonInvasiveModal"
42
>
43
Launch demo modal
44
</button>
45
46
<!-- Modal -->
47
<div
48
class="modal fade"
49
id="exampleNonInvasiveModal"
50
tabindex="-1"
51
role="dialog"
52
aria-labelledby="exampleNonInvasiveModalLabel"
53
aria-hidden="true"
54
data-mdb-modal-non-invasive="false"
55
>
56
<div class="modal-dialog modal-side modal-top-right" role="document">
57
<div class="modal-content">
58
<div class="modal-header">
59
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
60
<button
61
type="button"
62
class="btn-close"
63
data-mdb-dismiss="modal"
64
aria-label="Close"
65
></button>
66
</div>
67
<div class="modal-body">...</div>
68
<div class="modal-footer">
69
<button type="button" class="btn btn-secondary" data-mdb-dismiss="modal">
70
Close
71
</button>
72
<button type="button" class="btn btn-primary">Save changes</button>
73
</div>
74
</div>
75
</div>
76
</div>
77
78
79
80
</div>
81
<div class="modal-footer">
82
<button type="button" class="btn btn-secondary" data-mdb-dismiss="modal">
83
Close
84
</button>
85
<button type="button" class="btn btn-primary">Save changes</button>
86
</div>
87
</div>
88
</div>
89
</div>
xxxxxxxxxx
1
#exampleModal.modal.custom-class {
2
z-index: 1029
3
}
xxxxxxxxxx
1
const modal = document.getElementById('exampleModal');
2
const modal2 = document.getElementById('exampleModal2');
3
4
5
Console errors: 0