-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
32 lines (28 loc) · 798 Bytes
/
example.html
File metadata and controls
32 lines (28 loc) · 798 Bytes
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
<!doctype html>
<html>
<head>
<title>MicroFramework</title>
<style>
body {
background: #111;
margin: 0;
color: white;
height: 100vh;
width: 100%;
font-family: Arial, Helvetica, sans-serif;
display: block;
text-align: center;
}
</style>
</head>
<body>
<h1 class="sack">Add event handler for a click</h1>
<a href="#!">If you click me, the link changes.</a>
<script src="sackFramework.js"></script>
<script>
$(".sack").addEventListener("click", () => alert("Sack.min.js!"));
var c = false;
$("a").addEventListener("click", () => c ? $("a").setAttribute("href", "https://github.com/Fronbasal") : c = !c);
</script>
</body>
</html>