-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
72 lines (70 loc) · 1.97 KB
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightweight vanilla js modal component (just 2kb)</title>
<link rel="stylesheet" href="src/modal.css" />
<script src="src/modal.js"></script>
<style>
body {
margin: 0;
background: #daebf7;
padding: 100px 30px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
color: #003b57;
}
button {
color: #fff;
background-color: #259cd4;
border-color: #259cd4;
height: 42px;
text-align: center;
font-size: 14px;
padding: 0 30px;
width: 150px;
margin-top: 50px;
cursor: pointer;
border-radius: 6px;
}
.content {
max-width: 1000px;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="content">
<center>
<h1>Lightweight vanilla js modal component</h1>
<p>
This is just 2kb Lightweight vanilla js modal component with zero
dependencies , with option esc close , outside click close , tab key
focus inside Modal custom height , widht : check code in github :
<a href="https://github.com/idurar/vanilla-js-modal">
vanilla js modal github repo</a
>
</p>
<button class="openModal">Open Modal</button>
</center>
</div>
<div id="delete-record" style="display: none">
<div class="popup-container">
<p>your Modal content here !</p>
<input
type="text"
style="float: left; margin-right: 20px; height: 35px"
/>
<button class="closeModal" style="margin: 0">close Modal</button>
</div>
</div>
</body>
<script>
modal.init();
document
.querySelector(".openModal")
.addEventListener("click", function (e) {
modal.open("delete-record");
});
</script>
</html>