rodude123
048dc0b58b
<div class="grid__item"></div> <div class="grid__item"></div> <div class="grid__item"></div>the one as the main Signed-off-by: rodude123 <rodude123@gmail.com>
1 line
599 B
JavaScript
1 line
599 B
JavaScript
let dataText=["full stack developer","web designer","student","gamer","drummer"];function typeWriter(t,e,n){e<t.length?(document.querySelector("header div h1").innerHTML=t.substring(0,e+1)+'<span aria-hidden="true">_</span>',setTimeout((function(){typeWriter(t,e+1,n)}),100)):"function"==typeof n&&setTimeout(n,700)}function StartTextAnimation(t){void 0===dataText[t]?setTimeout((function(){StartTextAnimation(0)}),1500):t<dataText[t].length&&typeWriter(dataText[t],0,(function(){setTimeout(StartTextAnimation,1500,t+1)}))}document.addEventListener("DOMContentLoaded",(()=>{StartTextAnimation(0)})); |