Skip to content

Instantly share code, notes, and snippets.

@felquis
Created October 20, 2011 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felquis/1300278 to your computer and use it in GitHub Desktop.
Save felquis/1300278 to your computer and use it in GitHub Desktop.
O script mais sem utilidade que já fiz com javaScript.
window.onload = function(){
var arr = 'Posso parecer forte, mas só parecer.',
total = arr.length,
i = 0,
html, elem;
setInterval(function(){
elem = document.getElementById('text');
html = elem.firstChild.nodeValue;
if(i < total){
elem.appendChild(document.createTextNode(arr[i]));
i++;
} else {
console.log('fim.');
}
},100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment