0
I have a Javascript function that shows a text in an element with a "typewriter" effect, but I wanted to make this text come within a P tag (for line breaking). Could someone help me? Thanks in advance.
function EE(texto,ClassElemento,tempo){
var char = texto.split('').reverse();
var typer = setInterval(function () {
if (!char.length) return clearInterval(typer);
var next = char.pop();
document.querySelector(ClassElemento).innerHTML += next;
}, tempo);
}
But what is the question exactly? You want to put line breaks in the paragraph and don’t know how?
– Pedro Gaspar
The function shows a text with effect on some selector, but the function only launches the plain text with nothing. I wanted it to come inside a tag
P
– Takenomy