You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I love the typewriter function, it's perfect for a current project.
However, I'd like to get it to repeat after a set amount of time. What's the best way to do this?
I tried wrapping a function around the part that goes in the tags of the HTML pge and using setTImeout like so:
announcement();
function announcement() {
$(document).ready(function() {
$("#content #announcement h2").typewriter();
});
setTimeout("announcement()", 10000);
}
but after a few rounds, the typewriter would stop one character before the end, then the next time two characters before the end, etc. I'm very new to JavaScript so am stumped by this one, didn't think it would be so hard just to get something to repeat :(
The text was updated successfully, but these errors were encountered:
Hi,
I love the typewriter function, it's perfect for a current project.
However, I'd like to get it to repeat after a set amount of time. What's the best way to do this?
I tried wrapping a function around the part that goes in the tags of the HTML pge and using setTImeout like so:
announcement();
function announcement() {
$(document).ready(function() {
$("#content #announcement h2").typewriter();
});
setTimeout("announcement()", 10000);
}
but after a few rounds, the typewriter would stop one character before the end, then the next time two characters before the end, etc. I'm very new to JavaScript so am stumped by this one, didn't think it would be so hard just to get something to repeat :(
The text was updated successfully, but these errors were encountered: