I found a function to write out text with a typewriter effect. I want to change the text to be written out. Let me show you!
Now I have:
$.each((text).split('') ...
var text = "Some text here"
So now it uses the text in the text
variable. What I want to do is, to have multiple texts, and to be able to choose as following:
slotNumber
contains a number, eg 1, 2, 3 or 4 etc...
What I want to achieve is, to have mutiple text variables:
var text1 = "Some text"
var text2 = "Some other text"
var text3 = "Another text"
and to be able to use some concatenation, so that with
$.each(('text' + slotNumber).split('') ...
I use text1, text2 or text3 resp., depending on what slotNumber
contains.
I know, that ('text' + slotNumber).split('')
is incorrect, but what would be the correct way? Thank you!