Created
October 20, 2011 02:37
-
-
Save felquis/1300278 to your computer and use it in GitHub Desktop.
O script mais sem utilidade que já fiz com javaScript.
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
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