0

I'm using textillate.js to add animation to text. My html page looks like this

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Textillate</title>
    <link rel="stylesheet" href="animate.min.css">

    <script src="jquery-3.5.1.min.js"></script>
    <script src="jquery.lettering.js"></script>
    <script src="jquery.textillate.js"></script>
</head>
<body>
    <div class="tlt">
        Hello world
    </div>

    
    <script>
        $('.tlt').textillate({ in: { effect: 'bounceInDown' } });
    </script>
</body>
</html>

where the included scripts and css are taken from the following links:

The problem is that whatever I set as effect in the in object, the result is always the default textillate animation: the chars appear one after the other from left to right, and I can control the order of the appearing letters (e.g. setting shuffle: true, etc..), but not the animation type.

This is pretty much the example code that textillate offers on his github page, so I don't have any idea on where is the problem.

Paa
  • 69
  • 3
  • 14

1 Answers1

1

I think the problem is related to animate.css reference, i change it and it works. Hope it helps.

    $('.tlt').textillate({ in: { effect: 'flipInY' } });

    $('.tlt2').textillate({ in: { effect: 'rollIn' } });

    $('.tlt3').textillate({"loop":true,"in":{"effect":"fadeInDownBig","shuffle":false,"reverse":false,"sync":false},"out":{"effect":"hinge","shuffle":true,"reverse":false,"sync":false}});
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lettering.js/0.6.1/jquery.lettering.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/textillate/0.4.0/jquery.textillate.js"></script>

<div class="tlt">
        Hello world
</div>


<div class="tlt2" >
        Hello world
</div>


<div class="tlt3" >
        Hello world
</div>
ckarabay
  • 71
  • 3
  • I now actually copied the files used on the textillate website to be sure to use the same versions and it solved the problem, so maybe also you solution will work, I will try it in the future just to know it. Thanks for your answer – Paa Jul 21 '20 at 16:58