A javascript library that helps you apply animation on every single letter or character present inside of a container. Comes in handy when you wish to draw attention of the user.
Download or get the raw master.js file which contains the entire code. Include it in you web page.
<script src="master.js"> </script>
- Initialise Stanza.js
var stanza = new Stanza();
- Target the element which contains the text to be animated.
var element = $(".animatedTextContainer");
//you can use jquery or javascript
- Create animation settings object variable and pass it as a second argument in the config function
var animationSettings = {
"animationName":"hinge",
"background":"none",
"time":100
}
- Pass the target element and animationSettings to the config function called upon the stanza variable.
stanza.config(element, animationSettings);
The library uses jquery as a dependency so do not foreget to include that as well.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>