Hey there!
I am trying to make a typewriter function in Javascript, where it writes some text, deletes it and writes another text. Unfortunately is it not working....Any ideas what might have gone wrong?
(I have been trying to recreate this: https://safi.me.uk/typewriterjs/)
Also any of you guys who know, how I make this post into a question?
[CODE lang="html" title="HTML"]<!DOCTYPE html>
<html>
<head>
<script src="styles2.0.js"></script>
<title>hello world</title>
<div id="app"></div>
</head>
<body>
</body>
</html>
[/CODE]
[CODE title="Javascript external"]
var app = document.getElementById('app');
var typewriter = new Typewriter(app, {
loop: true
});
typewriter.typeString('Hello World!')
.pauseFor(2500)
.deleteAll()
.typeString('Strings can be removed')
.pauseFor(2500)
.deleteChars(7)
.typeString('<strong>altered!</strong>')
.pauseFor(2500)
.start();
[/CODE]
I am trying to make a typewriter function in Javascript, where it writes some text, deletes it and writes another text. Unfortunately is it not working....Any ideas what might have gone wrong?
(I have been trying to recreate this: https://safi.me.uk/typewriterjs/)
Also any of you guys who know, how I make this post into a question?
[CODE lang="html" title="HTML"]<!DOCTYPE html>
<html>
<head>
<script src="styles2.0.js"></script>
<title>hello world</title>
<div id="app"></div>
</head>
<body>
</body>
</html>
[/CODE]
[CODE title="Javascript external"]
var app = document.getElementById('app');
var typewriter = new Typewriter(app, {
loop: true
});
typewriter.typeString('Hello World!')
.pauseFor(2500)
.deleteAll()
.typeString('Strings can be removed')
.pauseFor(2500)
.deleteChars(7)
.typeString('<strong>altered!</strong>')
.pauseFor(2500)
.start();
[/CODE]
Last edited: