Skip to content

Instantly share code, notes, and snippets.

@MateusAndreatta
Created April 25, 2018 15:44
Show Gist options
  • Save MateusAndreatta/dbd9217b5ffaba69aaefef8eb0e0fb19 to your computer and use it in GitHub Desktop.
Save MateusAndreatta/dbd9217b5ffaba69aaefef8eb0e0fb19 to your computer and use it in GitHub Desktop.
script para typewritter
<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