Skip to content

Commit 598f792

Browse files
authored
add button funtionality
1 parent 0e81745 commit 598f792

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

script.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11

22
const compare = document.getElementById("#div-compare");
33
const original = document.getElementById("#div-original");
4+
5+
const originalHide = document.getElementById("#original-button");
6+
const compareHide = document.getElementById("#compare-button");
7+
8+
function original() {
9+
10+
if (originalHide.innerText === "Hide Original") {
11+
original.style.display = "none";
12+
originalHide.innerText = "Show Original";
13+
}
14+
15+
else {
16+
originalHide.innerText = "Hide Original";
17+
original.style.display = "unset";
18+
}
19+
20+
}

0 commit comments

Comments
 (0)