Shuffle letters around in an hovered element. At a set interval. Returns to original text when user stops hovering.
<a href="#" class="giberish">Example link text</a>
import { Girbshebi } from './girbshebi.js';
let nav = document.querySelectorAll( '.giberish' );
nav.forEach( ( elem ) => {
new Girbshebi( elem, { interval: 10, capitilize: true } );
})
Key | Type | Default | Note |
---|---|---|---|
interval |
number |
75 |
Shuffle text interval. Lower number, more frequent shuffle. |
capitilize |
boolean |
false |
Capitilize first letter. All others become lowercase. |
width |
boolean |
true |
Sets initial width using inline style. width:NNNpx and overflow:visible |
new Girbshebi( elem );
new Girbshebi( elem, {
interval: 150,
capitilize: true,
width: false
} );