-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.html
31 lines (27 loc) · 951 Bytes
/
bootstrap.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
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://unpkg.com/[email protected]"></script>
<script>
function closeModal() {
var container = document.getElementById("modals-here")
var backdrop = document.getElementById("modal-backdrop")
var modal = document.getElementById("modal")
modal.classList.remove("show")
backdrop.classList.remove("show")
setTimeout(function() {
container.removeChild(backdrop)
container.removeChild(modal)
}, 200)
}
</script>
</head>
<body>
<div class="container">
<h1>Twitter Bootstrap Modals..</h1>
<p>This is an example of using HTMX to remotely load modal dialogs using Twitter Bootstrap.</p>
<button hx-get="bootstrap-modal.html" hx-target="#modals-here" class="btn btn-primary">Open Modal</button>
</div>
<div id="modals-here"></div>
</body>
</html>