-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
69 lines (62 loc) · 1.58 KB
/
example.html
File metadata and controls
69 lines (62 loc) · 1.58 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Alerter - Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type='text/javascript' src='alerter.js'></script>
<script type='text/javascript'>
$(document).ready(function() {
var a = new Alerter({
message: 'Big Time Important Message',
prefix: 'my-class',
trigger: false
});
$('.trigger').on('click', function() {
a.show();
})
})
</script>
<style>
body { background-color: whitesmoke; font-family: Arial, Helvetica, Sans-Serif;}
/** your base class should have hidden as default **/
.my-class {
display: none;
}
/** your active class **/
.my-class-active {
display: block;
}
/** extra styles for demo - not essential **/
.trigger {
margin: 200px auto;
background: #e32b68;
opacity: 0.6;
cursor: pointer;
text-align: center;
width: 20vw;
border-radius: 10px;
padding: 20px;
}
.my-class, .my-class-active {
position: fixed;
top: 0;
left: 0;
width: 100vw;
text-align: center;
padding: 20px;
background: #42bcf7;
}
.alerter-close {
position: fixed;
right: 20px;
top: 10px;
cursor: pointer;
font-weight: bold;
}
</style>
</head>
<body class="body">
<div class="trigger">Click test</div>
</body>
</html>