-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodal.html
More file actions
53 lines (45 loc) · 2 KB
/
modal.html
File metadata and controls
53 lines (45 loc) · 2 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Bootstrap Hcode</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="modal" tabindex="-1" role="dialog" id="modal-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Teste de Modal</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ipsam magni ex sapiente qui recusandae enim labore accusantium inventore quisquam, dolor quibusdam. Provident unde assumenda corporis, rerum debitis non reprehenderit est.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
<button type="button" class="btn btn-primary">Confirmar</button>
</div>
</div>
</div>
</div>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-1">
Abrir Modal
</button>
<button type="button" class="btn btn-success" id="btn-open-modal">
Abrir Modal via JS
</button>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script>
$(function(){
$('#btn-open-modal').on('click', event => $('#modal-1').modal('show'));
});
</script>
</body>
</html>