I am just a little puzzled that at the moment I have the following code that works as expected, everything is fine with it. However, I would like to make some minor changes, as I would like the next function to be able to insert html markup inside the ie text itself;
var str = "Let get Future Ready!"; var split = str.split(""); var counter = 0; var SI = setInterval(function() { var typeText = $('.typetext'); typeText.append(split[counter]); counter++ if(counter == str.length){clearInterval(SI)} },100)
So, at the moment, this function takes an array, splits, and then uses the setInterval method, which I repeated along the length of the string. This allows the text to appear as if typed.
As you can see, my initial str value is 'var str = "Let get Future Ready!";'
However, I would like to add a gap to my value str 'var str = "Let get
Future Ready! "
First, is it possible? Secondly, if someone could offer me some advice, I would be grateful, thanks.
source share