Skip to content

Commit ae9d35a

Browse files
committed
Fixed problem with typewriter where swapping from and to the browser tab showing CodeWith messed up the phrase being typed
1 parent e0232cc commit ae9d35a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/typed-suffix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $(function () {
99

1010
function showText(target, message, index, maxInterval) {
1111
if (index < message.length) {
12-
$(target).append(message[index++]);
12+
$(target).text(message.substring(0, ++index));
1313

1414
var typingInterval = maxInterval - intervalTypingMillisecondsBase;
1515
if (typingInterval < 0) {

0 commit comments

Comments
 (0)