-
Notifications
You must be signed in to change notification settings - Fork 0
/
popover.html
36 lines (33 loc) · 1.29 KB
/
popover.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Belajar Bootstrap</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col">
<h1>Popover</h1>
</div>
</div>
<div class="row">
<div class="col">
<button class="btn btn-primary" data-bs-toggle="popover" data-bs-title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?" data-bs-placement="bottom" data-bs-trigger="hover">Click Me</button>
</div>
</div>
<div class="row">
<div class="col">
<h2 data-bs-toggle="popover" data-bs-title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?" data-bs-placement="bottom" data-bs-trigger="hover">Ini Contoh</h2>
</div>
</div>
</div>
<script src="bootstrap/js/bootstrap.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script>
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
</script>
</body>
</html>