-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
34 lines (25 loc) · 872 Bytes
/
script.js
File metadata and controls
34 lines (25 loc) · 872 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
32
33
34
let changed = false;
function changeContent() {
const heading1 = document.getElementById("heading1");
const heading2 = document.getElementById("heading2");
const heading3 = document.getElementById("heading3");
const image = document.getElementById("mainImage");
if (!changed) {
heading1.innerHTML = "Fresher";
heading2.innerHTML = "Looking for <span>Jobs</span>";
heading3.innerHTML = "MERN Stack Developer";
image.src = "dom2.webp";
image.classList.add("fade");
changed = true;
} else {
heading1.innerHTML = "Faizan Malik";
heading2.innerHTML = "Intern at <span>NoviTech</span>";
heading3.innerHTML = "B.Tech CSE Graduate";
image.src = "dom1.jpg";
image.classList.add("fade");
changed = false;
}
setTimeout(() => {
image.classList.remove("fade");
}, 800);
}