HTML
xxxxxxxxxx
1
<!-- Button trigger modal -->
2
<button type="button" class="btn btn-primary" data-mdb-ripple-init data-mdb-modal-init data-mdb-target="#exampleModal">
3
Launch demo modal
4
</button>
5
6
<!-- Modal -->
7
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
8
<div class="modal-dialog">
9
<div class="modal-content">
10
<div class="modal-header">
11
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
12
<button type="button" class="btn-close" data-mdb-ripple-init data-mdb-dismiss="modal" aria-label="Close"></button>
13
</div>
14
<div class="modal-body">
15
<div data-mdb-sortable-init class="sortable-list">
16
<div class="sortable-item">Item 1</div>
17
<div class="sortable-item">Item 2</div>
18
<div class="sortable-item">Item 3</div>
19
<div class="sortable-item">Item 4</div>
20
<div class="sortable-item">Item 5</div>
21
</div>
22
</div>
23
<div class="modal-footer">
24
<button type="button" class="btn btn-secondary" data-mdb-ripple-init data-mdb-dismiss="modal">Close</button>
25
<button type="button" class="btn btn-primary" data-mdb-ripple-init>Save changes</button>
26
</div>
27
</div>
28
</div>
29
</div>
30
CSS
xxxxxxxxxx
1
.sortable-item {
2
padding: 20px 10px;
3
border-bottom: solid 1px var(--mdb-secondary-border-subtle);
4
color: var(--mdb-body-color);
5
background: var(--mdb-secondary-bg-subtle);
6
display: flex;
7
flex-direction: row;
8
align-items: center;
9
justify-content: space-between;
10
user-select: none;
11
}
JS
1
1
Console errors: 0