A JavaScript Library To Simulate Typing Effect – typing.js

Category: Animation , Javascript , Text | July 11, 2017
Author: nishutosh
Views Total: 615
Official Page: Go to website
Last Update: July 11, 2017
License: MIT

Preview:

A JavaScript Library To Simulate Typing Effect – typing.js

Description:

Yet another pure JS library that emulates a user typing/deleting some text with (or without) a custom blinking cursor.

How to use it:

Create an inline element in which you want to type the text.

<span id="text"></span>

Add a blinking cursor at the end of the text while typing (OPTIONAL).

<span id="blinker">|</span>

Load the main JavaScript file ‘typing.js’ at the end of the document.

<script src="typing/typing.js"></script>

Define the text string you want to type.

var typing=Typing("Yet another JavaScript Library.")

Start the typing effect.

typing();

Add a delay to the typing effect.

// ~2000~ = 2 seconds
var typing=Typing("Yet another pure JS~2000~ library.")

Put the text into a new line:

var typing=Typing("Line 1 @Line 2")

Emulate the deleting effect.

var typing=Typing("Yet another pure JS~2000~ library that @emulates a user typing/deleting some some*some* text with (or without) a custom blinking cursor.")