jschr / textillate

A jquery plugin for CSS3 text animations.
http://textillate.js.org
MIT License
3.66k stars 759 forks source link

How to trigger animation when i enter the viewport? #81

Open nikola1970 opened 9 years ago

nikola1970 commented 9 years ago

Is there an option to start text animation when i enter certain element (h2 for example) in one of the sections which are below, because it starts automatically and when i come to the element below, the animation is already over?

Thanks!

jschr commented 9 years ago

You can manually trigger textillate to start the animation with

$tlt.textillate({ autoStart: false });

...

var someEventHandler = function () {
    $tlt.textillate('start');
};

https://github.com/jschr/textillate#methods

Hope that helps

mattsafaii commented 8 years ago

Hi @jschr is it possible to get a more detailed exampled of how to do this? I'm a bit lost. Thank you