-
Notifications
You must be signed in to change notification settings - Fork 23
/
script.js
97 lines (46 loc) · 1.37 KB
/
script.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
$(document).ready(function(){
//All code here
//NAVIGATION BAR
$("#nav-home").click(goHome);
function goHome() {
$("#display-area").empty();
let homeContent = `
<div class="navPage">
<p>Welcome to Fun With Marvel!<p>
<p>Challenge: Build out this homepage with interesting information.</p>
</div>
`
$("#display-area").append(homeContent)
}
$("#nav-mcu-timeline").click(sortByMCUTimeline);
function sortByMCUTimeline() {
$("#display-area").empty();
let sortedMCU = `
<div class="navPage">
<p>Challenge: Display here movies sorted by MCU Timeline.<p>
<p>Hint: "movieListDetailed" array of objects is already sorted by MCU Timeline. Link this nav button to that.</p>
</div>
`
$("#display-area").append(sortedMCU)
}
$("#nav-release-date").click(sortByReleaseDate);
function sortByReleaseDate() {
$("#display-area").empty();
let sortedReleaseDate = `
<div class="navPage">
Challenge: Display here movies sorted by Release Date.
</div>
`
$("#display-area").append(sortedReleaseDate)
}
$("#nav-credits").click(showCredits);
function showCredits() {
$("#display-area").empty();
let credits = `
<div class="navPage">
All images, descriptions, and data releated to Marvel on this Website is property of Marvel.
</div>
`
$("#display-area").append(credits)
}
});