Sunday, February 19, 2023

typewriter effect in js vs css

One disadvantage of using the typewriter effect in javascript instead of a spinner gif is that we can't replace the text with something else when finished -
$(#"divname").hide() does not seem to work.

What does seem to work is
document.getElementById('typingdiv').innerHTML = '<br><br>'

So we can use that with either a gif created with a "typing gif creator" like msgif.net or with a typewriter effect in css as the initial innerHTML.

No comments:

Post a Comment