Dan Schlosser / projects /



Published on May 16, 2015.

I built this JavaScript library to package up an implementation of a silly tagline feature on my old personal website. Substituteteacher.js allows for the creation of a rotating set of taglines. Input a list of strings and any configuration options, and the library will tokenize the sentences, find common words, and then animate between pairs of sentences, leaving common words on the page while making room for the appropriate removals, replacements, and additions.


If configured to do so, Substituteteacher.js will also find an optimal ordering of sentences to minimize the total number of changes needed to animate between all of the input sentences. You can check out a live demo, or view the source on GitHub.

See it in action