By default, the plugin will take the text inputted into the message value and write it out letter by letter into the target elemet. After each word, the element will be cleared of all text.
$('#text-writeout-1').textWriteout({
messages: ["Hello ", "World! "],
});
The plugin can also be set to clear it's element after each word or not clear the element at all by changing the deleteWord and DeleteWords properties.
$('#text-writeout-2-1').textWriteout({
messages: ["5", "4", "3", "2", "1", "0"],
deleteWord: true,
deleteWords: true,
});
$('#text-writeout-2-2').textWriteout({
messages: ["5", "4", "3", "2", "1", "0"],
deleteWord: false,
deleteWords: false,
});
There is also the option to stop the loop by modifying the loop property.
$('#text-writeout-3').textWriteout({
messages: ["ready, ", "get set, ", "go!"],
deleteWord: true,
deleteWords: false,
deleteLastWord: false,
loop: false,
});
In addition, the speed of each process can be adjusted with the letterWait, wordWait and deleteWait.
$('#text-writeout-4-1').textWriteout({
messages: ["A ", "need ", "for ", "speed!"],
letterWait: 50,
});
$('#text-writeout-4-2').textWriteout({
messages: ["A ", "need ", "for ", "speed!"],
wordWait: 200,
});
$('#text-writeout-4-3').textWriteout({
messages: ["A ", "need ", "for ", "speed!"],
deleteWait: 200,
});
There is also bonus effects that can be added to the text writeout to create different effects like creating a text cursor or selecting text before it is deleted.
$('#text-writeout-5-1').textWriteout({
messages: ["First Title", "Second Title", "Third Title"],
deleteWord: true,
deleteWords: false,
deleteLastWord: false,
loop: false,
wordCursor: true,
cursorBlink: true,
});
#demo .word-cursor{
color: #8758bc;
}
$('#text-writeout-5-2').textWriteout({
messages: ["First Title", "Second Title", "Third Title"],
deleteWord: true,
deleteWords: false,
deleteLastWord: false,
loop: false,
selectWord: true,
});
#demo .word-selected{
background-color: #8758bc;
padding: 2px;
color: #fff;
}
Will apply a blinking effect to the text cursor when set to true.
false
boolean
Sets the time that the blinking effect on the text cursor will take to complete one animation loop (in ms).
1000
int
When set to true, if words are being printed into the element, the blinking effect of the text cursor will be dactivated.
true
boolean
Allows you to add extra classes to the text cursor.
' '
string
Allows you to change the tag that the text cursor is wrapped within.
'span'
string
If set to true, will delete the last word when not deleting all words.
true
boolean
Sets the time that is waited before text is deleted(in ms).
1000
int
If set to true, will delete each word after it is printed in the element.
false
boolean
If set to true, will delete all the words after each one has been printed in the element.
true
boolean
Sets the time that is waited before the loop begins.
0
int
Sets the time that is waited before each letter is printed into tle loop.
250
int
Will loop the process if set to true.
true
boolean
Allows you to change the text that is printed into the element.
'["Hello ", "World! "]'
string or object
Sets the time that is waited after the loop ends.
0
int
If set to false, will hide the cursor when the selection effect is active.
true
boolean
Sets the time that is waited before the select effect.
1000
int
If set to true, a select effect will cover the element before it deleted.
false
boolean
Sets what word will be the starting point.
0
int
If set to true, a text styled cursor will be placed after the target element.
false
boolean
Sets the time that is waited before wach word is printed into the element.
1000
int