Created: 2012-03-20 09:02
Updated: 2014-08-20 17:38


#textplayer.js (a jquery plugin to simulate live text typing)

textplayer.js lets you easily simulate live typing of a text.

Check a live demo here

##Basic installation

  1. Insert the jquery and jquery UI plugins.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/bootstrap UI/js/jquery-ui-1.8.16.custom.min.js"></script>
  1. Create a container with the "data-text" attribute set to the value you want to be typed.
<div class="foobar" data-text="that's a nice text i'm typing right now."></div>
  1. Indicate to javascript where the text container is:

That's it!


You can customize the behavior of your text with custom buttons, delays between each character typed and a flashing cursor (in progress):

	autoPlay: false, 		// default: true 
	btnPlay: "#play",		// default: null
	btnPause: "#pause",		// default: null
	btnStop: "#stop",		// default: null
	slider: "#slider",		// default: null
	delay: 40,				// default: 100
	cursor: false			// default: false


Tested and works fine on Chrome 17.0.963.79, Safari 5.0.5 and Firefox 10.0.2.


I just started this project a few hours ago so it may definitely need improvements. Feel free to get in touch via Github/Twitter for suggestions or just start submitting patches!

##Follow me!


Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more