-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
31 lines (27 loc) · 976 Bytes
/
script.js
File metadata and controls
31 lines (27 loc) · 976 Bytes
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
/* Iteration 4: Make Everything Work */
// Pikachu - sky, ground, body, ears, cheeks,
var sky = document.getElementById("sky");
var buttonsky = document.getElementById("buttonsky");
buttonsky.oninput = () => {
sky.style.fill = buttonsky.value;
}
var ground = document.getElementById("ground");
var buttonground = document.getElementById("buttonground");
buttonground.oninput = () => {
ground.style.fill = buttonground.value;
}
var body = document.getElementById("body");
var buttonbody = document.getElementById("buttonbody");
buttonbody.oninput = () => {
body.style.fill = buttonbody.value;
}
var ears = document.getElementById("ears");
var buttonears = document.getElementById("buttonears");
buttonears.oninput = () => {
ears.style.fill = buttonears.value;
}
var cheeks = document.getElementById("cheeks");
var buttoncheeks = document.getElementById("buttoncheeks");
buttoncheeks.oninput = () => {
cheeks.style.fill = buttoncheeks.value;
}