-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
84 lines (66 loc) · 2.18 KB
/
main.html
File metadata and controls
84 lines (66 loc) · 2.18 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Gallery</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<nav>
<div class="logo">
<img src="images/logo.png">
</div>
<button type="button">List Property</button>
<img src="images/menu.png" class="menu">
</nav>
<div class="row">
<div class="col-1">
<h1>Explore <br> Best Property</h1>
<p>You Can Explore The Best Property Near You Or Location You Want To Get The Property</p>
<button type="button">Explore Properties</button>
<ul>
<li class="btn active"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
<div class="col-2">
<img src="images/pic1.png" id="banner">
</div>
</div>
</div>
<script>
//add class name====
var btn = document.getElementsByClassName("btn");
//add id name=======
var banner = document.getElementById("banner");
btn[0].onclick = function () {
banner.src = "images/pic1.png";
animation();
this.classList.add("active");
}
btn[1].onclick = function () {
banner.src = "images/pic2.png";
animation();
this.classList.add("active");
}
btn[2].onclick = function () {
banner.src = "images/pic3.png";
animation();
this.classList.add("active");
}
function animation() {
banner.classList.add("zoom");
setTimeout(function(){
banner.classList.remove("zoom")
},500);
for(b of btn){
b.classList.remove("active");
}
}
</script>
</body>
</html>