Line 106: | Line 106: | ||
(function typeIt() { | (function typeIt() { | ||
if (ch > qsa("[data-typer]")[0].dataset.typer.length)return; | if (ch > qsa("[data-typer]")[0].dataset.typer.length)return; | ||
− | if(qsa("[data-typer]")[0].dataset.typer[ch]!="<") | + | if(qsa("[data-typer]")[0].dataset.typer[ch]!="<"){ |
qsa("[data-typer]")[0].innerHTML = qsa("[data-typer]")[0].dataset.typer.substring(0, ch++); | qsa("[data-typer]")[0].innerHTML = qsa("[data-typer]")[0].dataset.typer.substring(0, ch++); | ||
− | else qsa("[data-typer]")[0].innerHTML=qsa("[data-typer]")[0].dataset.typer.substring(0, ch+=3); | + | console.log(qsa("[data-typer]")[0].innerHTML);} |
+ | else {qsa("[data-typer]")[0].innerHTML=qsa("[data-typer]")[0].dataset.typer.substring(0, ch+=3);qsa("[data-typer]")[0].innerHTML}; | ||
setTimeout(typeIt(), ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | setTimeout(typeIt(), ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | ||
}()); | }()); |
Revision as of 19:18, 30 October 2017