-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
30 lines (23 loc) · 746 Bytes
/
Copy pathscript.js
File metadata and controls
30 lines (23 loc) · 746 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
var typed = new Typed(".text",{
strings:["System Engineer", "AI Enthusiast"],
typeSpeed: 100,
backSpeed:100,
backDelay:1000,
loop:true
});
const textEl = document.getElementById("glitchText");
let original = "Joel Amos Philip";
let swapped = "Aggu";
let toggled = false;
textEl.addEventListener("click", () => {
// strong glitch flash
textEl.classList.add("active");
setTimeout(() => {
textEl.textContent = toggled ? original : swapped;
toggled = !toggled;
textEl.classList.remove("active");
}, 250); // same as animation duration
});
window.onload = () => {
document.getElementById("glitchText").classList.add("slideOnce");
};