Output Text With Delay - jQuery DelayText

File Size: 3.52 KB
Views Total: 757
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Output Text With Delay - jQuery DelayText

DelayText is a jQuery text animation plugin that outputs any text as words or characters with a given delay.

How to use it:

1. Download the plugin and include the JavaScript DelayText.js after jQuery.

<script src="https://code.jquery.com/jquery-3.3.1.min.js" 
        integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" 
        crossorigin="anonymous">
</script>
<script src="scripts/jquery-delaytext.js"></script>

2. Output your text character by character.

<div class="output">
</div>
$(".output").outputCharactersWithDelay("Hello world");

3. Output your text word by word.

<div class="output">
</div>
$(".output").outputWordsWithDelay("Hello world");

4. Customize the delay in milliseconds.

$(".output").outputWordsWithDelay("Hello world",{
  outputPartDelay: 200
});

5. Perform an action when the text has been completely output.

$(".output").outputWordsWithDelay("Hello world",{
  outputPartDelay: 200,
  completedCallBack: function(){
    // do something
  }
});

This awesome jQuery plugin is developed by kelvinperrie. For more Advanced Usages, please check the demo page or visit the official website.