Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.15 KB

README.md

File metadata and controls

55 lines (37 loc) · 1.15 KB

stanza.js

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.


Usage

Download or get the raw master.js file which contains the entire code. Include it in you web page.

<script src="master.js"> </script>

What you need to do

  1. Initialise Stanza.js
var stanza = new Stanza();
  1. Target the element which contains the text to be animated.
var element = $(".animatedTextContainer");
//you can use jquery or javascript
  1. Create animation settings object variable and pass it as a second argument in the config function
var animationSettings = {
  "animationName":"hinge",
	"background":"none",
	"time":100

}
  1. Pass the target element and animationSettings to the config function called upon the stanza variable.
stanza.config(element, animationSettings);

Dependecies

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>