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!
DISCUSSION (2)

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 Sep 15

Alcohol and developer culture

A candid discussion on alcohol in the developer community. Is your company culture slowly murdering your employees?

READ POST
Follow @samuraiseoul to see more of their posts in your feed.
Pierre Bouillon
Developer, student, tech enthusiast and coffee junky. I would be glad to speak with you!
Trending on dev.to
Basic Functional Programming Patterns in JavaScript
#javascript #functional #beginners #reduce
Vanilla JS, back to basics - Part. 1: variable scope
#javascript #webdev
🌠 react-shimmer: a Better way to handle async images in React!
#react #ui #webdev #javascript
Friday Frontend: Trying New Things Edition
#fridayfrontend #javascript #css #webdev
Lets Build Web Components! Part 4: Polymer Library
#webcomponents #customelements #polymer #javascript
User Authentication with Express.js
#dev #beginners #javascript
Let's talk about the state of auto-generated documentation tools for JavaScript
#discuss #javascript #tools
Stop! Don't test that!
#testing #javascript