I am trying to simulate the typing of a name using jquery, here is what I have so far:
var name = "hello there!";
var namesplit = name.split('');
$(document).ready(function () {
for (var i = 0; i < namesplit.length; i++) {
$('.wrapper h1').append(namesplit[i]);
}
});
Basically, what I want is for each character in "hello there!" to be entered, there be a slight delay, then the next character. Also, this is inserting into an h1 which has a span within it (which contains the character "|"). How could I prevent this from overwriting the span (i.e. it SHOULD be like this: Hello there!| NOT |Hello there!). Thanks!