0
//have a string containing your text: var str = "Hello World" //set the animation speed, aka interval timeout var timeout = 1000; //set the current char of the string (should be 0) var char = 0 /*define the writing function(, you could place it in the interval function but its easier to explain like this)*/ const write = () => { //set current char let c = str[char] /*TODO: Add you JQuery code to inject the letter to a element*/ //You could use plain js document.getElementById("your-id").innerText(c) char++ } //And set an interval setInterval(()=>{ write() },timeout)
11th Mar 2020, 7:11 PM
Jakob Meier
Jakob Meier - avatar