-
Notifications
You must be signed in to change notification settings - Fork 0
/
GuessMe.js
111 lines (106 loc) · 4.98 KB
/
GuessMe.js
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
function foxHint(){
document.getElementById("hint").innerHTML = "Hint: This animal is very tall and lives where it's hot."
}
function polarbearHint(){
document.getElementById("hint").innerHTML = "HINT: This animal lives where it is very cold."
}
function caribouHint(){
document.getElementById("hint").innerHTML = "HINT: This animal sheds their antlers once a year."
}
function bobcatHint(){
document.getElementById("hint").innerHTML = "HINT: This animal has the ability to climb trees."
}
function duckHint(){
document.getElementById("hint").innerHTML = "HINT: This animal can be found on my farms across the United States."
}
function fox(){
let input = document.getElementById("ans").value;
if(input==="Fox"|| input==="fox"){
var colorGreen = document.getElementById("feedback");
colorGreen.style.color="limegreen";
document.getElementById("feedback").innerHTML = "That is Correct!!"
document.getElementById("hint").innerHTML = "Scroll down to read more"
document.getElementById("nextButton").vlaue="Next"
document.getElementById("header").innerHTML = "Info:"
document.getElementById("information").innerHTML = "- This animal is approximatly 22 feet tall and can be found in the heart of Africa.<br/> - Unlike mamals in North America this animals feeds on vegitation high in the sky."
document.getElementById("filler").innerHTML = " "
document.getElementById("revealImg").style.display='block';
}
else{
var colorRed=document.getElementById("feedback");
colorRed.style.color="#FF0000";
document.getElementById("feedback").innerHTML = "Try again"
}
}
function polarbear(){
let input = document.getElementById("ans").value;
if(input==="Polar bear"|| input==="polar bear" || input==="polarbear" || input ==="Polarbear"){
var colorGreen = document.getElementById("feedback");
colorGreen.style.color="limegreen";
document.getElementById("feedback").innerHTML = "That is Correct!!"
document.getElementById("hint").innerHTML = "Scroll down to read more"
document.getElementById("header").innerHTML = "Info:"
document.getElementById("information").innerHTML = "- This animal can be found in the tundra <br/> - Polarbears are carnivores with their main food source feing fish."
document.getElementById("filler").innerHTML = " "
document.getElementById("revealImg").style.display="block";
}
else{
var colorRed=document.getElementById("feedback");
colorRed.style.color="#FF0000";
document.getElementById("feedback").innerHTML = "Try again"
}
}
function caribou(){
let input = document.getElementById("ans").value;
if(input==="Caribou"|| input==="caribou"){
var colorGreen = document.getElementById("feedback");
colorGreen.style.color="limegreen";
document.getElementById("feedback").innerHTML = "That is Correct!!"
document.getElementById("hint").innerHTML = "Scroll down to read more"
document.getElementById("header").innerHTML = "Info:"
document.getElementById("information").innerHTML = "- This animal can be found in the tundra <br/> - Caribou shed their antler once a year."
document.getElementById("filler").innerHTML = " "
document.getElementById("revealImg").style.display="block";
}
else{
var colorRed=document.getElementById("feedback");
colorRed.style.color="#FF0000";
document.getElementById("feedback").innerHTML = "Try again"
}
}
function bobcat(){
let input = document.getElementById("ans").value;
if(input==="Bobcat"|| input==="bobcat"){
var colorGreen = document.getElementById("feedback");
colorGreen.style.color="limegreen";
document.getElementById("feedback").innerHTML = "That is Correct!!"
document.getElementById("hint").innerHTML = "Scroll down to read more"
document.getElementById("header").innerHTML = "Info:"
document.getElementById("information").innerHTML = "- This animal can be found in the tundra <br/> - Caribou shed their antler once a year."
document.getElementById("filler").innerHTML = " "
document.getElementById("revealImg").style.display="block";
}
else{
var colorRed=document.getElementById("feedback");
colorRed.style.color="#FF0000";
document.getElementById("feedback").innerHTML = "Try again"
}
}
function duck(){
let input = document.getElementById("ans").value;
if(input==="Duck"|| input==="duck"){
var colorGreen = document.getElementById("feedback");
colorGreen.style.color="limegreen";
document.getElementById("feedback").innerHTML = "That is Correct!!"
document.getElementById("hint").innerHTML = "Scroll down to read more"
document.getElementById("header").innerHTML = "Info:"
document.getElementById("information").innerHTML = "- This animal spends most of it's time near water. <br/> - It is possibly to see them in large groups or bythemselves. <br/> - Their main food souce is the vegitation in their habitat."
document.getElementById("filler").innerHTML = " "
document.getElementById("revealImg").style.display="block";
}
else{
var colorRed=document.getElementById("feedback");
colorRed.style.color="#FF0000";
document.getElementById("feedback").innerHTML = "Try again"
}
}