typed js

Solutions on MaxInterview for typed js by the best coders in the world

showing results for - "typed js"
Mia
02 Jul 2020
1yarn add typed.js
2// or
3npm install typed.js
4// or
5bower install typed.js
6
7// in js file:
8import Typed from 'typed.js';
9
10const options = {
11  strings: ['<i>First</i> sentence.', '& a second sentence.'],
12  typeSpeed: 40
13};
14
15const typed = new Typed('.element', options);
Hillary
24 Jan 2021
1// Can also be included with a regular script tag
2import Typed from 'typed.js';
3
4var options = {
5  strings: ['<i>First</i> sentence.', '& a second sentence.'],
6  typeSpeed: 40
7};
8
9var typed = new Typed('.element', options);
Leila
09 Mar 2019
1    
2  var typed = new Typed("#typed", {
3    stringsElement: '#typed-strings',
4    typeSpeed: 0,
5    backSpeed: 0,
6    backDelay: 500,
7    startDelay: 1000,
8    loop: false,
9    onBegin: function(self) { prettyLog('onBegin ' + self) },
10    onComplete: function(self) { prettyLog('onCmplete ' + self) },
11    preStringTyped: function(pos, self) { prettyLog('preStringTyped ' + pos + ' ' + self); },
12    onStringTyped: function(pos, self) { prettyLog('onStringTyped ' + pos + ' ' + self) },
13    onLastStringBackspaced: function(self) { prettyLog('onLastStringBackspaced ' + self) },
14    onTypingPaused: function(pos, self) { prettyLog('onTypingPaused ' + pos + ' ' + self) },
15    onTypingResumed: function(pos, self) { prettyLog('onTypingResumed ' + pos + ' ' + self) },
16    onReset: function(self) { prettyLog('onReset ' + self) },
17    onStop: function(pos, self) { prettyLog('onStop ' + pos + ' ' + self) },
18    onStart: function(pos, self) { prettyLog('onStart ' + pos + ' ' + self) },
19    onDestroy: function(self) { prettyLog('onDestroy ' + self) }
20  });
21    
22