Giter Site home page Giter Site logo

jquery.typist's Introduction

jquery.typist

Animated text typing.

Live demo

Install

Download latest release. Use minified or development version.

Or use bower for install:

bower install jquery.typist --save

Usage

Include jQuery and jquery.typist on your page:

<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="jquery.typist.js"></script>

Prepare element for typing:

<p class="typist"></p>

Call method typist() with necessary options and text:

jQuery(function($) {
	$('.typist').typist({
		speed: 12,
		text: 'Hello!'
	});
});

Options

  • text {String} – text for typing;
  • speed {Number} – characters per second, default – 10;
  • cursor {Boolean} – shows blinking cursor, default – true;
  • blinkSpeed {Number} – blinking per second, default – 2;
  • typeFrom {String} – typing from start/end of element, default – 'end';
  • cursorStyles {Object} – CSS properties for cursor element.

Methods

  • typist( [options] ) – init method;
  • typistAdd( [text] ) – additional text for typing;
  • typistRemove( [length] ) – removes length number of characters;
  • typistPause( [delay] ) – pauses for delay milliseconds;
  • typistStop() – stops all animations.

Events

  • start_type.typist
  • end_type.typist
  • start_pause.typist
  • end_pause.typist
  • start_remove.typist
  • end_remove.typist
$('.typist')
	.on('start_type.typist', function() {
		console.log('Start typing');
	})
	.on('end_type.typist', function() {
		console.log('End typing');
	})
	.typist({ 
		speed: 12,
		text: 'Hello, typist!\n'
	});

jquery.typist's People

Contributors

albburtsev avatar

Watchers

James Cloos avatar Captain JK avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.