Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Anto426 authored Sep 24, 2024
1 parent 3dcfea8 commit da6a1f4
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,54 @@ function changertextinterval(text, idtext) {
setInterval(() => {
changetext(text, campo);
}, 6000);
}
}








const rootStyles = getComputedStyle(document.documentElement);

const layoutroot = document.getElementById('layoutroot');


document.addEventListener("DOMContentLoaded", function () {
let textchenger = new Textchenger()
textchenger.changertextinterval("I'm a high school student who likes Information and Communications Technology 💻✨", 'aboutfild')
});


/*
class Textchenger {
constructor() {
this.timesinglechar = 4
}
changetext(text, campo) {
return new Promise(async (resolve) => {
for (let i = 0; i < text.length; i++) {
await setTimeout(() => {
campo.innerHTML += text[i];
}, this.timesinglechar)
}
resolve(0)
})
}
changertextinterval(text, idtext) {
let campo = document.getElementById(idtext);
this.changetext(text, campo)
.then(() => {
console.log(idtext)
})
}
}
*/

0 comments on commit da6a1f4

Please sign in to comment.