• 🌙 Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

How TO - Typing Effect (1 Viewer)

Currently reading:
 How TO - Typing Effect (1 Viewer)

Recently searched:

Engfree

Member
LV
0
Joined
Aug 20, 2023
Threads
10
Likes
0
Awards
2
Credits
819©
Cash
0$

Creating a Typing Effect​

Step 1) Add HTML:​

Code:
<p id="demo"></p>

Step 2) Add JavaScript:​


Code:
var i = 0;
var txt = 'Lorem ipsum typing effect!'; /* The text */
var speed = 50; /* The speed/duration of the effect in milliseconds */

function typeWriter() {
  if (i < txt.length) {
    document.getElementById("demo").innerHTML += txt.charAt(i);
    i++;
    setTimeout(typeWriter, speed);
  }
}
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Similar threads

Users who are viewing this thread

Top Bottom