JavaScript Library To Obfuscate And Reveal Text – baffle

Category: Animation , Javascript , Recommended , Text | August 8, 2016
Author: camwiegert
Views Total: 1,415 views
Official Page: Go to website
Last Update: August 8, 2016
License: MIT

Preview:

JavaScript Library To Obfuscate And Reveal Text – baffle

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);

You Might Be Interested In:


Leave a Reply