-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
53 lines (49 loc) · 1.42 KB
/
script.js
File metadata and controls
53 lines (49 loc) · 1.42 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
var song = document.getElementById("song");
var icon = document.getElementById('icon');
var play = document.getElementById('play');
icon.onclick = function () {
if (song.paused) {
song.play();
icon.src = "playing.png";
}
else {
song.pause();
icon.src = "paused.png";
}
}
var song2 = document.getElementById("song2");
var icon2 = document.getElementById('icon2');
icon2.onclick = function () {
if (song2.paused) {
song2.play();
icon2.src = "playing.png";
}
else {
song2.pause();
icon2.src = "paused.png";
}
}
var song3 = document.getElementById("song3");
var icon3 = document.getElementById('icon3');
icon3.onclick = function () {
if (song3.paused) {
song3.play();
icon3.src = "playing.png";
}
else {
song3.pause();
icon3.src = "paused.png";
}
}
var song4 = document.getElementById("song4");
var icon4 = document.getElementById('icon4');
icon4.onclick = function () {
if (song4.paused) {
song4.play();
icon4.src = "playing.png";
}
else {
song4.pause();
icon4.src = "paused.png";
}
}