javascript - Need to know a function that loads on the DIV only and Not Body Onload -
could please me here. need code load on div , not on body onload. how can this?
<div id="typingtext"><h1>new ways move people</h1></div> <script type="text/javascript"> var text = "new ways move people !"; var chararray = text.split(""); var timer; function loop() { if (chararray.length > 0) { document.getelementbyid("typingtext").innerhtml += chararray.shift(); } else { cleartimeout(timer); return false; } timer = settimeout('loop()', 70); } </script>
Comments
Post a Comment