Dynamic text rewriting

Hi !

I saw some websites with a cool feature: rewriting all or part of a text with js ( a part example) but can I do this in js without an infinity loop that'll completely slow down browser performances?

I would love to implement my own version but have no clue on how.
Thanks for your help !

Did you find this post useful? Show some love!

I would use setInterval() to run your function every x seconds! Here's a reference on the typewriter effect w3schools.com/howto/howto_js_typew....

Exactly what I needed! I feel ashamed of not having found that ^ "
Thank you very much, I finally added it to my site!

Classic DEV Post from Jul 8

Why I hate Infinite Scrolling

I am sure you have seen old Pre-Material Design YouTube homepage layout where t...

READ POST
Follow @maheshkay to see more of their posts in your feed.
dev.to is now open source!
View Announcement Post View GitHub Repo
Pierre Bouillon
Developer, student, tech enthusiast and coffee junky. I would be glad to speak with you!
Trending on dev.to
Fail Mail #1: Failing at Git Publicly
#webdev #javascript #career #productivity
Monitor your PRs and issues with Github OctoLenses
#github #showdev #react #javascript
Module Monday 9: Masonry gallery, Side-scroll cards, Dark contact form & more
#showdev #opensource #webdev #javascript
How To Start Web Development On Android
#webdev #android #html #javascript
Playing with Discrete Fourier Transform Algorithm in JavaScript
#javascript #algorithms #computerscience #programming
Securing your website in 4 minutes - What, Why and How of HTTPS
#https #dns #web #webdev
Opensource Repository for All Experience
#beginners #opensource #javascript #webdev
The Web I Want
#web #html #performance #a11y