Created
May 16, 2022 17:11
-
-
Save saadh393/61ab07c849c88fac547028d43a566a1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const strings = document.querySelectorAll(".string"); | |
const toUpdate = ['react-redux"', 'showInterest"', 'এনরোল করুন"', 'আগ্রহী"']; | |
strings.forEach((string, index) => { | |
let text = toUpdate.shift().split(""); | |
string.innerHTML = '"'; | |
setTimeout(function () { | |
let interval = setInterval(function () { | |
text.length ? (string.innerHTML += text.shift()) : clearInterval(interval); | |
}, 100); | |
}, index * 1500); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment