forked from sf-wdi-gaia/dom-manipulation-lotr-lab
-
Notifications
You must be signed in to change notification settings - Fork 15
/
fellowship.js
132 lines (87 loc) · 2.64 KB
/
fellowship.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
console.log("Linked.");
// Dramatis Personae
var hobbits = [
'Frodo Baggins',
'Samwise \'Sam\' Gamgee',
'Meriadoc \'Merry\' Brandybuck',
'Peregrin \'Pippin\' Took'
];
var buddies = [
'Gandalf the Grey',
'Legolas',
'Gimli',
'Strider',
'Boromir'
];
var lands = ['The Shire', 'Rivendell', 'Mordor'];
var body = document.querySelector('body');
// Part 1
function makeMiddleEarth() {
// create a section tag with an id of middle-earth
// inside, add each land as an article tag
// inside each article tag include an h1 with the name of the land
// append middle-earth to your document body
}
makeMiddleEarth();
// Part 2
function makeHobbits() {
// display an unordered list of hobbits in the shire (which is the first article tag on the page)
// give each hobbit a class of hobbit
}
// Part 3
function keepItSecretKeepItSafe() {
// create a div with an id of 'the-ring'
// give the div a class of 'magic-imbued-jewelry'
// add an event listener so that when a user clicks on the ring, the nazgulScreech function (provided) is invoked
// add the ring as a child of Frodo
}
// Part 4
function makeBuddies() {
// create an aside tag
// attach an unordered list of the 'buddies' in the aside
// insert your aside as a child element of rivendell
}
// Part 5
function beautifulStranger() {
// change the 'Strider' textnode to 'Aragorn'
}
// Part 6
function leaveTheShire() {
// assemble the hobbits and move them to Rivendell
}
// Part 7
function forgeTheFellowShip() {
// create a new div called 'the-fellowship' within rivendell
// add each hobbit and buddy one at a time to 'the-fellowship'
// after each character is added make an alert that they have joined your party
}
// Part 8
function theBalrog() {
// change the 'Gandalf' textNode to 'Gandalf the White'
// apply style to the element
// make the background 'white', add a grey border
}
// Part 9
function hornOfGondor() {
// pop up an alert that the horn of gondor has been blown
// Boromir's been killed by the Uruk-hai!
// put a linethrough on boromir's name
// Remove Boromir from the Fellowship
}
// Part 10
function itsDangerousToGoAlone(){
// take Frodo and Sam out of the fellowship and move them to Mordor
// add a div with an id of 'mount-doom' to Mordor
}
// Part 11
function weWantsIt() {
// Create a div with an id of 'gollum' and add it to Mordor
// Remove the ring from Frodo and give it to Gollum
// Move Gollum into Mount Doom
}
// Part 12
function thereAndBackAgain() {
// remove Gollum and the Ring from the document
// remove all the baddies from the document
// Move all the hobbits back to the shire
}