-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery_faq.html
More file actions
265 lines (229 loc) · 8.93 KB
/
jquery_faq.html
File metadata and controls
265 lines (229 loc) · 8.93 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.invisible {
visibility: hidden;
}
.red{
background-color: red;
}
.blue{
background-color: blue;
}
.pink{
background-color: red;
}
.green{
background-color: darkblue;
}
.yellow{
background-color: yellow;
}
.gold{
background-color: gold;
}
.gray{
background-color: gray;
}
.orange{
background-color: blue;
}
.purple {
background-color: red;
}
.random{
background-color: #55ACEE;
}
.highlighted {
background-color: #FF0;
}
.frame{
display: flex;
}
</style>
</head>
<body>
<div class="hidding">
<h1>"Would you like to sign up for our newsletter?"</h1>
<span class="x">x</span>
</div>
<h2>"Would you like to register for the site?"</h2>
<p>10 FAQs about national parks</p>
<dl>
<dt>Who is the director of the National Park Service?</dt>
<dd>Margaret Everson, Counselor to the Secretary, is exercising the delegated authority of the Director of the National Park Service.</dd>
<dt>What government agency oversees the National Park Service?</dt>
<dd>The National Park Service is a bureau of the Department of the Interior. Directly overseeing its operation is the department's Assistant Secretary for Fish, Wildlife and Parks.</dd>
<dt>How many employees are in the National Park Service? </dt>
<dd>Permanent, temporary, and seasonal employees: Approximately 20,000
</dd>
<dd>Volunteers: More than 279,000 in 2019</dd>
<dt>How old is the National Park System?</dt>
<dd>The National Park Service was created by an act signed by President Woodrow Wilson on August 25, 1916. Yellowstone National Park was established by an act signed by President Ulysses S. Grant on March 1, 1872, as the nation's first national park. View the National Park System timeline.</dd>
<dt>What is the origin of the National Park Service arrowhead?</dt>
<dd>The arrowhead was authorized as the official National Park Service emblem by the Secretary of the Interior on July 20, 1951. The components of the arrowhead may have been inspired by key attributes of the National Park System, with the sequoia tree and bison representing vegetation and wildlife, the mountains and water representing scenic and recreational values, and the arrowhead itself representing historical and archeological values. Read more about the history of the arrowhead and other elements of NPS visual design.</dd>
<dt>How many areas are in the National Park System?</dt>
<dd>The system includes 423 areas covering more than 85 million acres in every state, the District of Columbia, American Samoa, Guam, Puerto Rico, and the Virgin Islands. </dd>
<dt>What is the largest national park site? Smallest?</dt>
<dd>Largest: Wrangell-St. Elias National Park and Preserve, AK, at 13.2 million acres</dd>
<dd> Smallest: Thaddeus Kosciuszko National Memorial, PA, at 0.02 acres</dd>
<dt>How many people visit the national parks?</dt>
<dd>Total recreation visitors to the national parks in 2019: 327,516,619.</dd>
<dt>What is the most-visited national park?</dt>
<dd>Golden Gate National Recreation Area</dd>
<dt> What is the National Park Service budget?</dt>
<dd>FY 2017 Enacted: $2.932 billion</dd>
</dl>
<button id="btn1" type="button" data-id="0" class="btn bth-default">click</button>
<button id="btn5" type="button" data-id="0" class="btn bth-default">click</button>
<h3 class="national-parks-heading">Arches</h3>
<ul>
<li>Covers a total area of 76,359 acres.</li>
<li>Number of people visited Arches in 2019 was 1,659,702</li>
<li>Was made a national park on November 12, 1971.</li>
</ul>
<h3 class="national-parks-heading">Carlsbad Caverns</h3>
<ul>
<li>Covers a total area of 79,766 acres.</li>
<li>The caves in Carlsbad Caverns are 56°F throughout the year, with high humidity.</li>
<li>At present there are 117 known caves in the park.</li>
</ul>
<h3 class="national-parks-heading">Badlands</h3>
<ul>
<li>Covers a total area of 244,000 acres.</li>
<li>It used to be a sea.</li>
<li>The entrance fee for Badlands is $25 per vehicle per week</li>
</ul>
<button id="btn2" type="button" data-id="1" class="btn bth-default">click</button>
<!--<div class="col-12 ">-->
<!--<div class="frame1 frame col-3">-->
<!-- <img src="img/23344937.png" alt="" id="pic1">-->
<!--</div>-->
<!--<div class="button1">-->
<!-- <button class="topDown" id="btn1-left-top">Swap Image</button>-->
<!--</div>-->
<!--<div class="frame2 frame col-3">-->
<!-- <img src="img/download1.jpeg" alt="" id="pic2">-->
<!--</div>-->
<!--<div class="button2">-->
<!-- <button class="topDown" id="btn1-left-bottom">Swap Image</button>-->
<!--</div>-->
<!--<div class="frame3 frame col-3">-->
<!-- <img src="img/images.jpg" alt="" id="pic3">-->
<!--</div>-->
<!--<div class="button3">-->
<!-- <button class="rightButtons" id="btn1-right-top">Swap Image</button>-->
<!--</div>-->
<!--</div>-->
<script src="js/jsQuery.js"></script>
<script>
"use strict";
$(document).ready(function() {
$('#btn1').click(function () {
$('dd').toggleClass('invisible');
})
$('#btn5').click(function () {
$('dt').toggleClass('random');
})
$('dd').click(function (){
$(this).addClass('invisible');
})
// $('dt').each(function () {
// $(this).click(e => {
// e.preventDefault()
// $(this).toggleClass()
$('dt').click(function(){
$(this).addClass('random')
})
$('#btn2').click(function () {
$("ul li:nth-last-child(1)").addClass("yellow");
// $('li').last().addClass('yellow');
})
// $('h3').click(e=>{
// e.preventDefault();
// $('ul').children().css('font-weight','bold')
// })
$('h3').dblclick(function (){
$(this).next().children('li').css("font-weight","bold")
})
$('li').click(function (){
$( "ul li:nth-last-child(3)" ).css( "color","blue" );
})
})
$('span').click(function (){
$('.hidding').hide()
})
$('ul').hide();
$('h3').click(function (){
$(this).next.slideToggle(1000 )('ul').show()
})
$("h2").hide().delay(2000).fadeIn(500);
//bonus
// var randomPic = ['img/images.jpg','img/download1.jpeg','img/download.jpeg','img/23344937.png'];
// var changePic = function(){
// $("#btn-top").click(function(){
// var randomIndex1 = Math.floor(Math.random() * randomPic.length);
// var randomIndex2 = (randomIndex1+1)%(randomPic.length);
// var randomIndex3 = (randomIndex2+1)%(randomPic.length);
// var randomIndex4 = (randomIndex3+1)%(randomPic.length);
//
// $('#pic1').attr('src', randomPic[randomIndex1]);
// $('#pic2').attr('src', randomPic[randomIndex2]);
// $('#pic3').attr('src', randomPic[randomIndex3]);
// $('#pic4').attr('src', randomPic[randomIndex4]);
//
// });
// };
// changePic()
// $('#btn1-left-top').click(function(){
// // var audio = new Audio('audio/ring-get.mp3');
// // audio.play();
// var first = $('#pic1').attr('src');
// var picIndex = 1;
// //Get random number up to 4, but if it is 1, try again
// while (picIndex === 1) {
// picIndex = Math.floor((Math.random() * 10) % 4) + 1;
// }
// //Swap images
// var swap = $('#pic'+ picIndex).attr('src');
// $('#pic1').attr("src", swap);
// $('#pic'+ picIndex).attr('src', first);
// });
//
//
// $('#btn1-left-bottom').click(function(){
// var first = $('#pic2').attr('src');
// var picIndex = 2;
// //Get random number up to 4, but if it is 1, try again
// while (picIndex === 2) {
// picIndex = Math.floor((Math.random() * 10) % 4) + 1;
// }
// //Swap images
// var swap = $('#pic'+ picIndex).attr('src');
// $('#pic2').attr("src", swap);
// $('#pic'+ picIndex).attr('src', first);
// });
//
// $('#btn1-right-top').click(function(){
//
// var first = $('#pic3').attr('src');
// var picIndex = 3;
// //Get random number up to 4, but if it is 1, try again
// while (picIndex === 3) {
// picIndex = Math.floor((Math.random() * 10) % 4) + 1;
// }
// //Swap images
// var swap = $('#pic'+ picIndex).attr('src');
// $('#pic3').attr("src", swap);
// $('#pic'+ picIndex).attr('src', first);
// });
//
//
//
//
</script>
</body>
</html>