Import JavaScript file: <script src="src/typeme-min.js"></script>
And you're done. Watch the plugin animate typing!
> If the plugin detects multiple elements, the animation will be mirrored on them.
typeSpeed: int - Animation typing speed (Default: 70)
backspaceSpeed: int - Animation backspacing speed (Default: 20)
pauseAfterFullstop: int - Amount of time the animation will wait after full stop in a string (Default: 500)
loop: bool - Loop animation (Default: false)
stopOnLastString: bool - Skip backspacing last string after finished typing (Default: true)
animationStartDelay: int - Delay before the animation starts (Default: 750)
typeStartDelay: int - Delay before each sentence starts being typed out (Default: 500)
backspaceStartDelay: int - Delay before each sentence starts being backspaced (Default: 500)
onBegin - Callback function that runs after the animation has started
onStringFinished - Callback function that runs after typing out each string
onComplete - Callback function that runs after the animation is complete
cursorID: string - Adds the ID to the cursor element
cursorClass: string - Adds the class name to the cursor element
cursor: string - Sets the cursor element (Default: "|")
cursorRemoveOnAnimationComplete: boolean - Removes the cursor on animation completion
cursorAnimationSpeed: int - Number of times cursor blinks in a second (Default: 2)
> If the animation is used on an input element, the cursor won't be displayed!
TypeMe offers couple of methods to manipulate the state of the animation. All methods accept a callback function.
.pause(callback); - pauses the animation
.resume(callback); - resumes the animation
.toggle(callback); - toggles between paused and resumed states
.restart(callback); - restarts the animation