-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (36 loc) · 1.25 KB
/
index.html
File metadata and controls
41 lines (36 loc) · 1.25 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
<!doctype <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mun ja Samin nettisivu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="index.css" />
</head>
<body>
<h1 id="title">Samin ja Juliuksen kaverisivu</h1>
<div class="ImageContainer">
<img class="Image" id="imageOfSami" src="./sami.jpg" />
<img class="Image" id="imageOfJulius" src="./julius.jpg" />
</div>
<script type="text/javascript">
(function(){
const title = document.getElementById('title');
const imageOfSami = document.getElementById('imageOfSami');
const imageOfJulius = document.getElementById('imageOfJulius');
imageOfSami.addEventListener('mouseover', () => {
title.classList.add('FlashyTitle0');
});
imageOfJulius.addEventListener('mouseover', () => {
title.classList.add('FlashyTitle1');
});
imageOfSami.addEventListener('mouseleave', () => {
title.classList.remove('FlashyTitle0');
});
imageOfJulius.addEventListener('mouseleave', () => {
title.classList.remove('FlashyTitle1');
});
})();
</script>
</body>
</html>