Line 109: | Line 109: | ||
ch = 0; | ch = 0; | ||
− | + | function typeIt(typer) { | |
if (ch > tot) return; | if (ch > tot) return; | ||
if(txt[ch]!="<") | if(txt[ch]!="<") | ||
− | + | typer.html(txt.substring(0, ch++)); | |
− | else | + | else typer.html(txt.substring(0, ch+=3)); |
setTimeout(typeIt, ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | setTimeout(typeIt, ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | ||
− | },$typer.data("delay")); | + | } |
+ | setTimeout(typeIt($typer),$typer.data("delay")); | ||
}); | }); |
Revision as of 18:28, 30 October 2017