Author: | camwiegert |
---|---|
Views Total: | 1,772 views |
Official Page: | Go to website |
Last Update: | August 8, 2016 |
License: | MIT |
Preview:

Description:
baffle.js is a small JavaScript library used to obfuscate and reveal your text with a shuffle animation.
How to use it:
Include the minified version of baffle.js script on the html document.
<script src="baffle.min.js"></script>
Call the Baffle on the element containing text you want to obfuscate.
// With a CSS selector let a = baffle('.text'); // With a Node let a = baffle(document.querySelector('.text')); // With a NodeList let a = baffle(document.querySelectorAll('p'));
Call the Baffle with some options.
let a = baffle('.text', { // default options characters: 'abcdefghijklmnopqrstuvwxyz', speed: 75 // animation speed });
Obfuscates each element once.
a.once();
Start the obfuscate animation.
a.start();
Stop the animation.
a.stop();
Reveal the text.
a.reveal();
Reveal the text over 5000ms
a.reveal(5000);