Pure JavaScript Library To Rotate Through Sentences – substituteteacher.js

Category: Javascript , Text | July 30, 2015
Author: danrschlosser
Views Total: 605 views
Official Page: Go to website
Last Update: July 30, 2015
License: MIT

Preview:

Pure JavaScript Library To Rotate Through Sentences – substituteteacher.js

Description:

substituteteacher.js is a simple-to-use yet fully configurable JavaScript library for rotating through an array of sentences like a text rotator.

How to use it:

Download and include the substituteteacher.js script on your html page.

<script src="path/to/substituteteacher.js"></script>

Add an array of sentences you want to rotate through and star the rotation using using run() method.

new Sub([
      "A daring JavaScript library for subsitute teachers",
      "A hilarious JavaScript library for awesome taglines",
      "A sveltee JavaScript library for sweet taglines",
      "A badass JavaScript library for sliding fun",
      "A JavaScript library for word substitution",
    ], {/*OPTIONS HERE*/}).run();

Available options.

// Id of the injection point for HTML  
containerId: "sub"

// Namespace to prepend to classes used internally 
namespace: "sub"

// Number of milliseconds between each change 
interval: 5000

// Number of milliseconds that each step of the animation should take  
speed: 200

// True to enable console logging  
verbose: false

// True if the first sentence to appear should be random 
random: false

// True if the sentences should be ordered to minimize the number of changes performed 
best: true

You Might Be Interested In:


Leave a Reply