-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (45 loc) · 1.02 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
<!DOCTYPE html>
<head>
<title>Toasty</title>
<script type="text/javascript" src="./lib/toasty.js" charset="utf-8"></script>
<style media="screen">
.my-div {
padding: 20px;
text-align: center;
}
.party {
background-color: rebeccapurple;
}
</style>
</head>
<body>
<script>
$t(() => {
$t('.my-div.cool').on('click', () => alert('clicked'));
$t('.remove-me').remove();
setInterval(() => {
$t('.my-div.cool').toggleClass('party')
}, 500)
$t.ajax({
method: "GET",
url: "http://api.openweathermap.org/data/2.5/weather",
data: { appid: "6593357a84983f34982acc13f791e08d", q: "NY,NY" },
success(data) {
const node = document.createElement("p");
$t(node).append(data);
$t('li').append(node);
}
})
});
</script>
<div class="my-div cool">
<h1>Hello!</h1>
<p class="remove-me">Remove me!</p>
</div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>