-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskills.js
33 lines (29 loc) · 902 Bytes
/
skills.js
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
const text = "Skills";
const delay = 80; // Delay in milliseconds between each character
let index = 0;
function typeText(){
if (index < text.length) {
document.getElementById("skill-header").textContent += text.charAt(index);
index++;
setTimeout(typeText, delay);
}
}
let peachCount=0;
function peach(){
document.getElementById('peach').addEventListener('click', function(){
peachCount++;
if (peachCount<12){
var peachPic = document.createElement("img");
peachPic.src="peach.png";
peachPic.classList.add("peachPic");
document.getElementById("col2").appendChild(peachPic);
}
else{
alert("PEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAACCCCCCCCCCCHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH")
}
});
}
window.onload = function (){
peach();
typeText();
};