Textillate.js v0.4.1
See a live demo here.
Textillate.js combines some awesome libraries to provide an easy-to-use plugin for applying CSS3 animations to any text.
Usage
Let's start with the basic markup:
My Title
And your JavaScript should look like this:
This will animate using the default options. To change the defaults, you can either use the html data api:
Title
or pass in options on initialization (see full list of options below):
;
You can also tell textillate.js to animate a list with the following markup:
Some Title Another Title
;
Notice that you can control the animation parameters on each text (<li>
) using the data api.
Dependencies
To start using textillate.js, you will need the following:
Options
;
Events
Textillate triggers the following events:
start.tlt
- triggered when textillate startsinAnimationBegin.tlt
- triggered when the in animation beginsinAnimationEnd.tlt
- triggered when the in animation endsoutAnimationBegin.tlt
- triggered when the out animation beginsoutAnimationEnd.tlt
- triggered when the in animation endsend.tlt
- triggered when textillate ends
;
Methods
$element.textillate('start')
- Manually start/restart textillate$element.textillate('stop')
- Manually pause/stop textillate$element.textillate('in')
- Trigger the current text's in animation$element.textillate('out')
- Trigger the current text's out animation