jQuery

【jQuery】テキストをスマートにシャッフルするShuffleText

October 9, 2016
ShuffleText

ShuffleTextはテキストをスマートにシャッフルするjQueryプラグイン。

JS

<script src="https://code.jquery.com/jquery-1.12.3.min.js" integrity="sha256-aaODHAgvwQW1bFOGXMeX+pC4PZIPsvn2h1sArYOhgXQ="   crossorigin="anonymous"></script>
<script src="js/shuffletext/js/shuffletext.js"></script>

Examples

Basic usage

$('#text').ShuffleText([
    'First Text',
    'Second Text',
    '...'
]);

Infinite loop

$('#text').ShuffleText([
    'First Text',
    'Second Text',
    '...'
], {loop: true});

Infinite loop with a custom delay between each text

$('#text').ShuffleText([
    'First Text',
    'Second Text',
    '...'
], {loop: true, delay: '5000'});

Options

  1. loop
  2. iterations
  3. delay
  4. shuffleSpeed
  5. step

MIT
Demo/Download