Created
April 25, 2018 15:44
-
-
Save MateusAndreatta/dbd9217b5ffaba69aaefef8eb0e0fb19 to your computer and use it in GitHub Desktop.
script para typewritter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function typeWrite(elemento){ | |
const textoArray = elemento.innerHTML.split(''); | |
elemento.innerHTML = ''; | |
textoArray.forEach((letra, i) => { | |
setTimeout(function(){ | |
elemento.innerHTML += letra; | |
}, 75 * i) | |
}) | |
} | |
const titulo = document.querySelector(".textoParaTypeWritter"); | |
typeWrite(titulo); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment