-
Notifications
You must be signed in to change notification settings - Fork 0
/
elephant.html
73 lines (71 loc) · 2.19 KB
/
elephant.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="fa/css/font-awesome.min.css">
<title>Emily Zimmerman 3D Printing</title>
<link href="https://fonts.googleapis.com/css?family=Abel|Montserrat|Trirong|Dancing+Script" rel="stylesheet">
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<header>
<br>
<br>
<a href="index.html"> <h1>Emily Zimmerman 3D Printing</h1> </a>
<br>
<br>
<br>
<nav>
<a href="index.html"><h4>Home</h4></a><a href="products.html"><h4>Products</h4></a><a href="about.html"><h4>About</h4></a>
</nav>
</header>
<br>
<span class="back"><a href="products.html"><i class="fa fa-arrow-left" aria-hidden="true"></i></a></span>
<div class="product">
<img class="slide" src="img/elephant.jpg">
<img class="slide" src="img/elephant2.jpg">
<img class="slide" src="img/elephant3.jpg">
<div class="buttons">
<button id="next" onclick="lastDiv()"><i class="fa fa-arrow-left" aria-hidden="true"></i>
</button>
<button id="next" onclick="nextDiv()"><i class="fa fa-arrow-right" aria-hidden="true"></i>
</button>
</div>
<h4>Elephant</h4>
<select id="dropdown" onchange="run()">
<option value="Size">Size</option>
<option value="$6">1-3in</option>
<option value="$8">4-6in</option>
<option value="$10">7-10in</option>
</select>
<button id="price">Select Size</button>
</div>
<script>
var slideIndex = 1;
showDivs(slideIndex);
function nextDiv() {
showDivs(slideIndex += 1);
}
function currentDiv(n) {
showDivs(slideIndex = n);
}
function lastDiv() {
showDivs(slideIndex -= 1);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("slide");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "block";
}
function run() {
var x = document.getElementById("dropdown").value;
document.getElementById("price").innerHTML = x;
}
</script>
</body>
</html>