Chardelay.js is a tiny (1.5Kb gzipped) library that creates at least one new element that will display each item of content with a delay. In it's simplest form it will display text similar to a typing effect. Chardelay.js has been designed to perform with most modern browsers including IE8. While Chardelay.js can stand on it's own without any other library dependencies it is capable of accepting a jQuery element object as a parameter.

Getting Started

Grab a copy then add the minified version to your document (the following assumes you have a /js directory to place the file into):

<script src="js/chardelay.min.js"></script> Example of adding Chardelay to an HTML document.

Once that is in place we can begin with the initialization. The initialization can be simple or robust.

In it's simplest form a new Chardelay instance can be created with only one argument. This required arugment will be the content which we want to have a delayed display. This argument takes either a String , Number , or an Array .

// Create a string var myStr = "No matter where you go, there you are."; // Create a basic Chardelay instance var myCd = Chardelay(myStr); Illustrating the most basic instance of Chardelay.

This minimal usage may not be entirely practical as it uses the default settings so Chardelay.js allows for customization via overriding the defaults with optional parameters.

Optional Parameters

Chardelay.js has six (6) optional parameters that are available.