Print Text Character By Character At The Given Speed - jQuery selfw

File Size: 3.07 KB
Views Total: 450
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Print Text Character By Character At The Given Speed  - jQuery selfw

selfw is a jQuery plugin to mimic a typewriter effect, enabling you to print any text on the screen character by character at a fixed or random speed.

How to use it:

1. Download the plugin and load the selfw.js script after jQuery.

<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="/path/to/selfw.js"></script>

2. Call the function on the existing text content and the plugin will do the rest.

<p id="text">
  Any Text Here
</p>
$(function(){
  $("#text").selfw()
});

3. You're also allowed to define the text in the text parameter.

<p id="text">
  <!-- Empty Container -->
</p>
$(function(){
  $("#text").selfw({
    text: 'Your Text Here'
  })
});

4. Customize the typing speed. Default: 100ms.

$(function(){
  $("#text").selfw({
    time: 200,
  })
});

5. Or randomly change the speed of typing.

$(function(){
  $("#text").selfw({
    random: true
  })
});

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